Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void applyEffect_77(ArrayList cibles, Fight fight)
- {
- int value = 1;
- try
- {
- value = Integer.parseInt(_args.split(";")[0]);
- }catch(NumberFormatException e){};
- int num = 0;
- for(Fighter target : cibles)
- {
- int val = Formulas.getPointsLost('m', value, _caster, target);
- if(val < value)
- {
- SocketManager.GAME_SEND_GA_PACKET_TO_FIGHT(fight, 7, 309, _caster.getGUID()+"", target.getGUID()+","+(value-val));
- }
- if(val < 1)continue;
- target.addBuff(Constants.STATS_REM_PM, val, _turns,0, true, _spell,_args,_caster, _debuffable);
- SocketManager.GAME_SEND_GA_PACKET_TO_FIGHT(fight, 7,Constants.STATS_REM_PM, _caster.getGUID()+"", target.getGUID()+",-"+val+","+_turns);
- num += val;
- //Gain de PM pendant le tour de jeu
- if(target.canPlay() && target == _caster) target.setCurPM(fight, target.getPM()+val);
- }
- if(num != 0)
- {
- SocketManager.GAME_SEND_GA_PACKET_TO_FIGHT(fight, 7,Constants.STATS_ADD_PM, _caster.getGUID()+"", _caster.getGUID()+","+num+","+_turns);
- _caster.addBuff(Constants.STATS_ADD_PM, num, _turns, _turns, true, _spell,_args,_caster, _debuffable);
- _caster.setCurPM(fight, _caster.getPM() + num);
- }
- }
Add Comment
Please, Sign In to add comment