Merge branch 'improve-bloom' into 'master'
Add mort myre stems and pears to bloom's effect, and add the sound effect for bloom. See merge request 2009scape/2009scape!361
This commit is contained in:
@@ -78,3 +78,4 @@
|
|||||||
- Fishing and fishing trawler now use closer-to-empirical formulae.
|
- Fishing and fishing trawler now use closer-to-empirical formulae.
|
||||||
- Server configuration language has been changed from JSON to TOML.
|
- Server configuration language has been changed from JSON to TOML.
|
||||||
- Add Family Crest quest.
|
- Add Family Crest quest.
|
||||||
|
- Add mort myre stems and pears to bloom's effect, and add the sound effect for bloom.
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ public final class FieldPickingPlugin extends OptionHandler {
|
|||||||
for(PickingPlant p : PickingPlant.values()){
|
for(PickingPlant p : PickingPlant.values()){
|
||||||
SceneryDefinition.forId(p.objectId).getHandlers().put("option:pick",this);
|
SceneryDefinition.forId(p.objectId).getHandlers().put("option:pick",this);
|
||||||
}
|
}
|
||||||
|
SceneryDefinition.forId(3511).getHandlers().put("option:take-cutting",this);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -88,11 +89,14 @@ public final class FieldPickingPlugin extends OptionHandler {
|
|||||||
full = object.transform(2073);
|
full = object.transform(2073);
|
||||||
SceneryBuilder.replace(object, full);
|
SceneryBuilder.replace(object, full);
|
||||||
}
|
}
|
||||||
if (plant == PickingPlant.FUNGI_ON_LOG) {
|
boolean isBloomPlant = plant == PickingPlant.FUNGI_ON_LOG
|
||||||
full = object.transform(3508);
|
|| plant == PickingPlant.BUDDING_BRANCH
|
||||||
|
|| plant == PickingPlant.GOLDEN_PEAR_BUSH;
|
||||||
|
if (isBloomPlant) {
|
||||||
|
full = object.transform(object.getId() - 1);
|
||||||
SceneryBuilder.replace(object, full);
|
SceneryBuilder.replace(object, full);
|
||||||
}
|
}
|
||||||
if (plant != PickingPlant.FUNGI_ON_LOG) {
|
if (!isBloomPlant) {
|
||||||
SceneryBuilder.replace(plant == PickingPlant.BANANA_TREE_4 ? full : object, object.transform(banana ? plant.respawn : 0), banana ? 300 : plant.respawn);
|
SceneryBuilder.replace(plant == PickingPlant.BANANA_TREE_4 ? full : object, object.transform(banana ? plant.respawn : 0), banana ? 300 : plant.respawn);
|
||||||
}
|
}
|
||||||
if (!plant.name().startsWith("NETTLES")) {
|
if (!plant.name().startsWith("NETTLES")) {
|
||||||
@@ -189,7 +193,8 @@ public final class FieldPickingPlugin extends OptionHandler {
|
|||||||
ONION_0(3366, 1957, 30),
|
ONION_0(3366, 1957, 30),
|
||||||
ONION_1(5538, 1957, 30),
|
ONION_1(5538, 1957, 30),
|
||||||
FUNGI_ON_LOG(3509, 2970, -1),
|
FUNGI_ON_LOG(3509, 2970, -1),
|
||||||
GOLDEN_PEAR_BUSH(3513, 2974, 30),
|
BUDDING_BRANCH(3511, 2972, -1),
|
||||||
|
GOLDEN_PEAR_BUSH(3513, 2974, -1),
|
||||||
GLOWING_FUNGUS_0(4932, 4075, 30),
|
GLOWING_FUNGUS_0(4932, 4075, 30),
|
||||||
GLOWING_FUNGUS_1(4933, 4075, 30),
|
GLOWING_FUNGUS_1(4933, 4075, 30),
|
||||||
RARE_FLOWERS(5006, 2460, 30),
|
RARE_FLOWERS(5006, 2460, 30),
|
||||||
|
|||||||
@@ -35,6 +35,8 @@ class NSListeners : InteractionListener() {
|
|||||||
val SPELLCARD = Items.DRUIDIC_SPELL_2968
|
val SPELLCARD = Items.DRUIDIC_SPELL_2968
|
||||||
val USED_SPELLCARD = Items.A_USED_SPELL_2969
|
val USED_SPELLCARD = Items.A_USED_SPELL_2969
|
||||||
val FUNGUS = Items.MORT_MYRE_FUNGUS_2970
|
val FUNGUS = Items.MORT_MYRE_FUNGUS_2970
|
||||||
|
val STEM = Items.MORT_MYRE_STEM_2972
|
||||||
|
val PEAR = Items.MORT_MYRE_PEAR_2974
|
||||||
val MIRROR_TAKEN = "/save:ns:mirror_taken"
|
val MIRROR_TAKEN = "/save:ns:mirror_taken"
|
||||||
val GROTTO_SEARCHED = "/save:ns:grotto_searched"
|
val GROTTO_SEARCHED = "/save:ns:grotto_searched"
|
||||||
val WISHING_WELL = 28715
|
val WISHING_WELL = 28715
|
||||||
@@ -139,11 +141,23 @@ class NSListeners : InteractionListener() {
|
|||||||
on(intArrayOf(DRUID_POUCH, DRUID_POUCH_EMPTY), ITEM, "fill"){player, node ->
|
on(intArrayOf(DRUID_POUCH, DRUID_POUCH_EMPTY), ITEM, "fill"){player, node ->
|
||||||
|
|
||||||
if(player.questRepository.getStage("Nature Spirit") >= 75) {
|
if(player.questRepository.getStage("Nature Spirit") >= 75) {
|
||||||
if (amountInInventory(player, Items.MORT_MYRE_FUNGUS_2970) >= 3) {
|
if (amountInInventory(player, PEAR) >= 3) {
|
||||||
if (node.id != Items.DRUID_POUCH_2958) {
|
if (node.id != Items.DRUID_POUCH_2958) {
|
||||||
removeItem(player, node, Container.INVENTORY)
|
removeItem(player, node, Container.INVENTORY)
|
||||||
}
|
}
|
||||||
removeItem(player, Item(Items.MORT_MYRE_FUNGUS_2970, 3), Container.INVENTORY)
|
removeItem(player, Item(PEAR, 3), Container.INVENTORY)
|
||||||
|
addItem(player, Items.DRUID_POUCH_2958, 9 )
|
||||||
|
} else if (amountInInventory(player, STEM) >= 3) {
|
||||||
|
if (node.id != Items.DRUID_POUCH_2958) {
|
||||||
|
removeItem(player, node, Container.INVENTORY)
|
||||||
|
}
|
||||||
|
removeItem(player, Item(STEM, 3), Container.INVENTORY)
|
||||||
|
addItem(player, Items.DRUID_POUCH_2958, 6)
|
||||||
|
} else if (amountInInventory(player, FUNGUS) >= 3) {
|
||||||
|
if (node.id != Items.DRUID_POUCH_2958) {
|
||||||
|
removeItem(player, node, Container.INVENTORY)
|
||||||
|
}
|
||||||
|
removeItem(player, Item(FUNGUS, 3), Container.INVENTORY)
|
||||||
addItem(player, Items.DRUID_POUCH_2958, 3)
|
addItem(player, Items.DRUID_POUCH_2958, 3)
|
||||||
} else {
|
} else {
|
||||||
sendDialogue(player, "You need 3 fungus before you can do that.")
|
sendDialogue(player, "You need 3 fungus before you can do that.")
|
||||||
@@ -230,4 +244,4 @@ class CompleteSpellPulse(val player: Player) : Pulse(2){
|
|||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -104,6 +104,18 @@ object NSUtils {
|
|||||||
success = true
|
success = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (obj.name.equals("Rotting branch", ignoreCase = true) && player.skills.prayerPoints >= 1) {
|
||||||
|
if (player.location.withinDistance(obj.location, 2)) {
|
||||||
|
SceneryBuilder.replace(obj, obj.transform(3511))
|
||||||
|
success = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (obj.name.equals("A small bush", ignoreCase = true) && player.skills.prayerPoints >= 1) {
|
||||||
|
if (player.location.withinDistance(obj.location, 2)) {
|
||||||
|
SceneryBuilder.replace(obj, obj.transform(3513))
|
||||||
|
success = true
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return success
|
return success
|
||||||
@@ -115,6 +127,7 @@ object NSUtils {
|
|||||||
*/
|
*/
|
||||||
private fun handleVisuals(player: Player) {
|
private fun handleVisuals(player: Player) {
|
||||||
player.skills.decrementPrayerPoints(RandomFunction.random(1, 3).toDouble())
|
player.skills.decrementPrayerPoints(RandomFunction.random(1, 3).toDouble())
|
||||||
|
player.audioManager.send(1493)
|
||||||
val AROUND_YOU = player.location.surroundingTiles
|
val AROUND_YOU = player.location.surroundingTiles
|
||||||
for (location in AROUND_YOU) {
|
for (location in AROUND_YOU) {
|
||||||
// The graphic is meant to play on a 3x3 radius around you, but not
|
// The graphic is meant to play on a 3x3 radius around you, but not
|
||||||
@@ -122,4 +135,4 @@ object NSUtils {
|
|||||||
player.packetDispatch.sendGlobalPositionGraphic(263, location)
|
player.packetDispatch.sendGlobalPositionGraphic(263, location)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user