public void addToComputer(PixelmonEntityHelper p) {
   for (ComputerBox c : storageBoxes) {
     if (c.hasSpace()) {
       c.add(p, getId());
       return;
     }
   }
   ChatHandler.sendChat(p.getOwner(), "You have no space left in your computer!");
 }
Example #2
0
 @Override
 public void applyRepeatedEffect(PixelmonEntityHelper user, PixelmonEntityHelper target) {
   ChatHandler.sendChat(
       user.getOwner(),
       target.getOwner(),
       user.getName() + " is trapped in a vortex and takes damage!");
   user.attackEntityFrom(
       DamageSource.causeMobDamage((EntityLiving) user.getEntity()),
       (int) (((float) user.getMaxHealth()) / 16));
 }
Example #3
0
 @Override
 public void turnTick(PixelmonEntityHelper user, PixelmonEntityHelper target) {
   if (effectTurns == 0) {
     ChatHandler.sendChat(
         user.getOwner(),
         target.getOwner(),
         user.getName() + " breaks free of the swirling vortex!");
     user.getStatus().remove(this);
   }
   effectTurns--;
 }
Example #4
0
 @Override
 public void ApplyEffect(
     PixelmonEntityHelper user, PixelmonEntityHelper target, ArrayList<String> attackList) {
   if (checkChance()) {
     if (target.getType().contains(Type.Fire)) {
       ChatHandler.sendChat(user.getOwner(), target.getOwner(), "no effect!");
       return;
     }
     for (StatusEffectBase e : target.getStatus())
       if (e.type == StatusEffectType.FireSpin) {
         ChatHandler.sendChat(
             user.getOwner(),
             target.getOwner(),
             target.getName() + " is already spinning in fire!");
         return;
       }
     effectTurns = mod_Pixelmon.getRandomNumberBetween(4, 5);
     target.getStatus().add(this);
     ChatHandler.sendChat(
         user.getOwner(), target.getOwner(), target.getName() + " is trapped in a vortex!");
   } else ChatHandler.sendChat(user.getOwner(), target.getOwner(), user.getName() + " failed!");
 }