forked from 2009Scape/Server
Add damage scaling to Crumble Undead
The spell damage scales like Magic Dart, but due to the limitation of only affecting undead enemies, deals 2 more damage. If the enemy is not undead, deals only 1 damage (set to 1 instead of 0 to prevent splashing abuse).
This commit is contained in:
parent
98e8cd4592
commit
e8afa4e529
1 changed files with 5 additions and 1 deletions
|
|
@ -47,7 +47,11 @@ public enum SpellType {
|
|||
CRUMBLE_UNDEAD(1.2) {
|
||||
@Override
|
||||
public int getImpactAmount(Entity e, Entity victim, int base) {
|
||||
return 15; // Hits as high as Earth blast
|
||||
if (((NPC) victim).getTask() != null && ((NPC) victim).getTask().undead) {
|
||||
return 12 + (e.getSkills().getLevel(Skills.MAGIC) / 10);
|
||||
}
|
||||
((Player) e).sendMessage("Your spell does almost no damage, as your target is not undead.");
|
||||
return 1;
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue