mirror of
https://gitlab.com/2009scape/2009scape.git
synced 2025-12-20 13:30:27 -07:00
Merge branch 'waterbirth-fixes' into 'master'
Waterbirth Dungeon is cannonable, Spinolyps only drain prayer if they hit, and... See merge request 2009scape/2009scape!388
This commit is contained in:
commit
79f864048a
4 changed files with 11 additions and 3 deletions
|
|
@ -111,3 +111,5 @@
|
||||||
- Removed regular bones from wolf drop table - Lethimyr
|
- Removed regular bones from wolf drop table - Lethimyr
|
||||||
- Fix Gertrude's Cat quest not completing - ryannathans
|
- Fix Gertrude's Cat quest not completing - ryannathans
|
||||||
- Fix missing special attack damage modifiers for range and melee attacks - vk
|
- Fix missing special attack damage modifiers for range and melee attacks - vk
|
||||||
|
- Waterbirth Dungeon is now cannonable - aweinstock
|
||||||
|
- Spinolyps only drain prayer if they hit, and always target ranged defence (plus null reference fix) - aweinstock
|
||||||
|
|
|
||||||
|
|
@ -122,6 +122,12 @@ public final class SpinolypNPC extends AbstractNPC {
|
||||||
return 12;
|
return 12;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int calculateDefence(Entity v, Entity e) {
|
||||||
|
// Spinolyps' attack always targets ranged defence
|
||||||
|
return CombatStyle.RANGE.getSwingHandler().calculateDefence(v, e);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void visualize(Entity entity, Entity victim, BattleState state) {
|
public void visualize(Entity entity, Entity victim, BattleState state) {
|
||||||
super.visualize(entity, victim, state);
|
super.visualize(entity, victim, state);
|
||||||
|
|
@ -137,7 +143,7 @@ public final class SpinolypNPC extends AbstractNPC {
|
||||||
@Override
|
@Override
|
||||||
public void impact(Entity entity, Entity victim, BattleState state) {
|
public void impact(Entity entity, Entity victim, BattleState state) {
|
||||||
super.impact(entity, victim, state);
|
super.impact(entity, victim, state);
|
||||||
if (super.getType() == CombatStyle.MAGIC) {
|
if (super.getType() == CombatStyle.MAGIC && state.getEstimatedHit() > 0) {
|
||||||
victim.getSkills().decrementPrayerPoints(1);
|
victim.getSkills().decrementPrayerPoints(1);
|
||||||
} else {
|
} else {
|
||||||
if (RandomFunction.random(20) == 5) {
|
if (RandomFunction.random(20) == 5) {
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,7 @@ public final class WaterBirthDungeonZone extends MapZone implements Plugin<Objec
|
||||||
* Constructs a new {@code WaterBirthDungeonZone} {@code Object}.
|
* Constructs a new {@code WaterBirthDungeonZone} {@code Object}.
|
||||||
*/
|
*/
|
||||||
public WaterBirthDungeonZone() {
|
public WaterBirthDungeonZone() {
|
||||||
super("Water birth dungeon", true, ZoneRestriction.CANNON, ZoneRestriction.RANDOM_EVENTS);
|
super("Water birth dungeon", true, ZoneRestriction.RANDOM_EVENTS);
|
||||||
PluginManager.definePlugin(new DagannothKingNPC());
|
PluginManager.definePlugin(new DagannothKingNPC());
|
||||||
PluginManager.definePlugin(new DoorSupportNPC());
|
PluginManager.definePlugin(new DoorSupportNPC());
|
||||||
PluginManager.definePlugin(new DungeonOptionHandler());
|
PluginManager.definePlugin(new DungeonOptionHandler());
|
||||||
|
|
|
||||||
|
|
@ -154,7 +154,7 @@ open class RangeSwingHandler
|
||||||
Projectile.ranged(entity, victim, g.id, g.height, 36, 41, 5).send()
|
Projectile.ranged(entity, victim, g.id, g.height, 36, 41, 5).send()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
val weapon: RangeWeapon? = RangeWeapon.get(state.weapon.id)
|
val weapon: RangeWeapon? = state.weapon?.let { RangeWeapon.get(it.id) }
|
||||||
val anim = entity.properties.attackAnimation.id
|
val anim = entity.properties.attackAnimation.id
|
||||||
weapon?.let {
|
weapon?.let {
|
||||||
if ((anim == 422 || anim == 423)) {
|
if ((anim == 422 || anim == 423)) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue