forked from 2009Scape/Server
Changes to Ava's devices from Animal Magnetism
The devices no longer need to be worn, completing the quest is enough. Also standardized arrow break rates to exactly 20% at all levels. Ava's devices will pick up 100% of the arrows that don't break.
This commit is contained in:
parent
f3c9dd2d9c
commit
40196333ad
1 changed files with 7 additions and 4 deletions
|
|
@ -345,7 +345,7 @@ open class RangeSwingHandler (vararg flags: SwingHandlerFlag)
|
|||
dropLocation = null
|
||||
}
|
||||
if (dropLocation != null && state.rangeWeapon.isDropAmmo) {
|
||||
val rate = 5 * (1.0 + e.skills.getLevel(Skills.RANGE) * 0.01) * dropRate
|
||||
val rate = 5 * dropRate
|
||||
if (RandomFunction.randomize(rate.toInt()) != 0) {
|
||||
val drop = GroundItemManager.increase(Item(ammo.id, amount), dropLocation, e)
|
||||
if (drop != null) {
|
||||
|
|
@ -367,20 +367,23 @@ open class RangeSwingHandler (vararg flags: SwingHandlerFlag)
|
|||
*/
|
||||
private fun getDropRate(e: Entity?): Double {
|
||||
if (e is Player) {
|
||||
val cape = e.equipment[EquipmentContainer.SLOT_CAPE]
|
||||
//val cape = e.equipment[EquipmentContainer.SLOT_CAPE]
|
||||
val weapon = e.equipment[EquipmentContainer.SLOT_WEAPON]
|
||||
if (cape != null && (cape.id == 10498 || cape.id == 10499) && weapon != null && weapon.id != 10034 && weapon.id != 10033) {
|
||||
//if (cape != null && (cape.id == 10498 || cape.id == 10499) && weapon != null && weapon.id != 10034 && weapon.id != 10033) {
|
||||
if (hasRequirement(e, "Animal Magnetism", false) && weapon != null && weapon.id != 10034 && weapon.id != 10033) {
|
||||
val rate = 80
|
||||
if (RandomFunction.random(100) < rate) {
|
||||
/*
|
||||
val torso = e.equipment[EquipmentContainer.SLOT_CHEST]
|
||||
val modelId = torso?.definition?.maleWornModelId1 ?: -1
|
||||
if (modelId == 301 || modelId == 306 || modelId == 3379) {
|
||||
e.packetDispatch.sendMessage("Your armour interferes with Ava's device.")
|
||||
return 1.0
|
||||
}
|
||||
*/
|
||||
return (-1).toDouble()
|
||||
}
|
||||
return 0.33
|
||||
return 0.0
|
||||
}
|
||||
}
|
||||
return 1.0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue