There is a fairly significant bug with clue scrolls. The only npcs that drops clue scrolls right now are hellhonds (that is because their ids are hard-coded in TreasureTrailPlugin.createDrop()). All other npcs do not drop clues due to a bug in `NPCDropTables`.
`NPCDropTables` has two separate ways to access the actual table: one is though `List<WeightedChanceItem> defaultTable`, ` List<WeightedChanceItem> charmTable`, and `List<WeightedChanceItem> mainTable`; And the other is though a combined table `NPCDropTable table`. The problem is that only `NPCDropTable table` is set properly--the other 3 tables are always empty.
The reason clues were bugged was because `TreasureTrailPlugin.createDrop()` has a check for `npc.getDefinition().getDropTables().getMainTable().size() < 3`, which always fails. I really do not see the point in this check to begin with, so i am going to remove it. The hard-coded check for hellounds is pointless as well and should be removed.
I am also going to remove the 3 empty tables from `NPCDropTables` to avoid and similar bugs in the future.
Alternatively, it is possible to make changes to `DropTableParser` and keep those tables, then add post-parsing step to populate `NPCDropTable table` from them. However that would just duplicate all the data in all drops table, and since nothing else was using these individual tables, i just opted for removing them.
This fixes the issue of all shop prices being 5% more than they are supposed to (like dlong/d skimmy being 105k insread of 100k, and even spirit shards being 26 ea instead of 25 ea).
The original change to add FarmingPatch.TROLL_STRONGHOLD_HERB to isFlowerProtected() was introduced a few days ago in order to attempt to make the troll patch disease-free.. however, it doesnt work.
The reason is that Patch.isFlowerProtected():297 has a check for `patch.type` to be `PatchType.ALLOTMENT`. That chech will return false before the when statement is ever executed.
I moved the check for TROLL_STRONGHOLD_HERB up a level since "isFlowerProtected" didnt seem like a right place for it anyway since it is not a flower protection.
Currently, a grown evil turnip has infinite yeild. This happens because of the return statemnt in the `else` calse of `chance` definition in `Patch.rollLivesDecrement()`.
Because of the return, the method exists before `cropLives` is decremented.
Currenly the check is done against the entire ImpactLog, which includes NPC damage.
This becomes very annoying when it comes to places like god wars where npcs constantly attach each other.
This change makes the loot check only look at other players, and not npcs.
The ironman player in question still has to do the most damage (including npcs) to get the drop.
- Uncomposted patches no longer get lives incremented as if composted.
- Pitfall NPCs use the proper machinery for being not-attackable (so aviansies are no longer meleeable).
- Compost and supercompost now properly affect minimum herb yield.
- Troll stronghold herb patch is now disease-free.
- Mushroom patch west of Canifis now allows growing bittercap mushrooms.
- White lillies now grant protection to allotments.
- `NPC.hasProtectionPrayer` now accurately reflects protection prayers defined in `npc_configs.json`.
- NPC protection prayers now block 100% of the damage when attacked by a player in `Entity.getFormattedHit` instead of only blocking 40%.