Guest User

Untitled

a guest
Jan 23rd, 2018
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.76 KB | None | 0 0
  1. public void korasiMultiHit(int damage) {
  2. for (Player p : Server.playerHandler.players) {
  3. Client person = (Client) p;
  4. if (p != null && p != c) {
  5. Client otherPlayers = (Client) p;
  6. if (person.distanceToPoint(c.absX, c.absY) == 0) {
  7. //do stuff here for when player is under you
  8. } else if (person.distanceToPoint(c.absX, c.absY) == 1) {
  9. otherPlayers.handleHitMask(damage, CombatType.MAGE);
  10. otherPlayers.dealDamage(damage);
  11. } else if (person.distanceToPoint(c.absX, c.absY) == 2) {
  12. otherPlayers.handleHitMask(damage / 2, CombatType.MAGE);
  13. otherPlayers.dealDamage(damage / 2);
  14. } else if (person.distanceToPoint(c.absX, c.absY) == 3) {
  15. otherPlayers.handleHitMask(damage / 4, CombatType.MAGE);
  16. otherPlayers.dealDamage(damage / 4);
  17. }
  18. otherPlayers.getPA().refreshSkill(3);
  19. //otherPlayers.CIcon = 2;
  20. otherPlayers.gfx100(1248);
  21. }
  22. }
  23. }
  24. public void korasiMultiHitNPC(int damage) {
  25. for (NPC n : Server.npcHandler.npcs) {
  26. Client npc = (Client) n;
  27. if (n != null && n != c) {
  28. Client otherNPCs = (Client) n;
  29. if (npc.distanceToPoint(c.absX, c.absY) == 0) {
  30. //do stuff here for when player is under you
  31. } else if (npc.distanceToPoint(c.absX, c.absY) == 1) {
  32. otherNPCs.handleHitMask(damage, CombatType.MAGE);
  33. otherNPCs.dealDamage(damage);
  34. } else if (npc.distanceToPoint(c.absX, c.absY) == 2) {
  35. otherNPCs.handleHitMask(damage / 2, CombatType.MAGE);;
  36. otherNPCs.dealDamage(damage / 2);
  37. } else if (npc.distanceToPoint(c.absX, c.absY) == 3) {
  38. otherNPCs.handleHitMask(damage / 4, CombatType.MAGE);
  39. otherNPCs.dealDamage(damage / 4);
  40. }
  41. otherNPCs.getPA().refreshSkill(3);
  42. otherNPCs.gfx100(1248);
  43. }
  44. }
  45. }
Add Comment
Please, Sign In to add comment