예제 #1
0
 public void unInvoke() {
   if (canBeUninvoked()) {
     if ((affected != null) && (affected instanceof MOB)) {
       MOB mob = (MOB) affected;
       if ((building != null) && (!aborted)) {
         if (messedUp) {
           if (activity == CraftingActivity.MENDING) messedUpCrafting(mob);
           else if (activity == CraftingActivity.LEARNING) {
             commonEmote(mob, "<S-NAME> fail(s) to learn how to make " + building.name() + ".");
             building.destroy();
           } else if (activity == CraftingActivity.REFITTING)
             commonEmote(mob, "<S-NAME> mess(es) up refitting " + building.name() + ".");
           else commonEmote(mob, "<S-NAME> mess(es) up making " + building.name() + ".");
         } else {
           if (activity == CraftingActivity.MENDING) building.setUsesRemaining(100);
           else if (activity == CraftingActivity.LEARNING) {
             deconstructRecipeInto(building, recipeHolder);
             building.destroy();
           } else if (activity == CraftingActivity.REFITTING) {
             building.basePhyStats().setHeight(0);
             building.recoverPhyStats();
           } else dropAWinner(mob, building);
         }
       }
       building = null;
       activity = CraftingActivity.CRAFTING;
     }
   }
   super.unInvoke();
 }
예제 #2
0
 @Override
 public void unInvoke() {
   if (canBeUninvoked()) {
     if (affected instanceof MOB) {
       final MOB mob = (MOB) affected;
       if ((buildingI != null) && (!aborted)) {
         if (messedUp) {
           if (activity == CraftingActivity.LEARNING)
             commonEmote(mob, L("<S-NAME> fail(s) to learn how to make @x1.", buildingI.name()));
           else commonTell(mob, L("You've ruined @x1!", buildingI.name(mob)));
           buildingI.destroy();
         } else if (activity == CraftingActivity.LEARNING) {
           deconstructRecipeInto(buildingI, recipeHolder);
           buildingI.destroy();
         } else dropAWinner(mob, buildingI);
       }
       buildingI = null;
     }
   }
   super.unInvoke();
 }
 @Override
 public void unInvoke() {
   if (canBeUninvoked()) {
     if (affected instanceof MOB) {
       final MOB mob = (MOB) affected;
       if ((buildingI != null) && (!aborted)) {
         if (messedUp) {
           if (activity == CraftingActivity.MENDING) messedUpCrafting(mob);
           else if (activity == CraftingActivity.LEARNING) {
             commonEmote(mob, L("<S-NAME> fail(s) to learn how to make @x1.", buildingI.name()));
             buildingI.destroy();
           } else if (activity == CraftingActivity.REFITTING)
             commonEmote(mob, L("<S-NAME> mess(es) up refitting @x1.", buildingI.name()));
           else commonEmote(mob, L("<S-NAME> mess(es) up making @x1.", buildingI.name()));
         } else {
           if (activity == CraftingActivity.MENDING) {
             buildingI.setUsesRemaining(100);
             CMLib.achievements()
                 .possiblyBumpAchievement(mob, AchievementLibrary.Event.MENDER, 1, this);
           } else if (activity == CraftingActivity.LEARNING) {
             deconstructRecipeInto(buildingI, recipeHolder);
             buildingI.destroy();
           } else if (activity == CraftingActivity.REFITTING) {
             buildingI.basePhyStats().setHeight(0);
             buildingI.recoverPhyStats();
           } else {
             dropAWinner(mob, buildingI);
             CMLib.achievements()
                 .possiblyBumpAchievement(mob, AchievementLibrary.Event.CRAFTING, 1, this);
           }
         }
       }
       buildingI = null;
       activity = CraftingActivity.CRAFTING;
     }
   }
   super.unInvoke();
 }
예제 #4
0
파일: Tailoring.java 프로젝트: bbailey/ewok
 public void unInvoke() {
   if (canBeUninvoked()) {
     if ((affected != null) && (affected instanceof MOB)) {
       MOB mob = (MOB) affected;
       if ((building != null) && (!aborted)) {
         if (messedUp) {
           if (mending) messedUpCrafting(mob);
           else if (refitting)
             commonEmote(mob, "<S-NAME> mess(es) up refitting " + building.name() + ".");
           else commonEmote(mob, "<S-NAME> mess(es) up knitting " + building.name() + ".");
         } else {
           if (mending) building.setUsesRemaining(100);
           else if (refitting) {
             building.baseEnvStats().setHeight(0);
             building.recoverEnvStats();
           } else dropAWinner(mob, building);
         }
       }
       building = null;
       mending = false;
     }
   }
   super.unInvoke();
 }