コード例 #1
0
 public ClimbableSurface() {
   super();
   name = "the surface";
   basePhyStats.setWeight(4);
   climbA = CMClass.getAbility("Prop_Climbable");
   if (climbA != null) {
     climbA.setAffectedOne(this);
     climbA.makeNonUninvokable();
   }
   recoverPhyStats();
 }
コード例 #2
0
 public void finishInit(CMObject A) {
   if (affected == null) return;
   if (A instanceof Ability) {
     ((Ability) A).makeNonUninvokable();
     ((Ability) A).makeLongLasting();
     ((Ability) A).setAffectedOne(affected);
   }
   if ((A instanceof Behavior) && (affected instanceof PhysicalAgent))
     ((Behavior) A).startBehavior((PhysicalAgent) affected);
   if (affected != null) affected.recoverPhyStats();
   if (affected instanceof MOB) {
     ((MOB) affected).recoverCharStats();
     ((MOB) affected).recoverMaxState();
   }
   initialized = true;
 }