コード例 #1
0
 /**
  * Attack the stored target
  *
  * @param pBlock the heroes physical block
  * @param mBlock the heroes magical block
  */
 public void attack(int pBlock, int mBlock) {
   if (target != null) {
     target.setHitPoints(
         target.getHitPoints()
             - (this.getPhysicalDamage() - pBlock)
             - (this.getMagicalDamage() - mBlock));
   }
   target = null;
 }
コード例 #2
0
 public void callFrom() {
   ITarget iTarget = new TargetI();
   iTarget.call();
 }