public void applyKillEffectsToPlayer(Player player) { for (Inventory.WearSlot slot : Inventory.WearSlot.values()) { ItemType type = player.inventory.getItemTypeInWearSlot(slot); if (type == null) continue; applyUseEffect(player, null, type.effects_kill); } }
private void removeNonStackableActorCondition( Player player, ActorConditionType type, int magnitude, int duration) { for (Inventory.WearSlot slot : Inventory.WearSlot.values()) { ItemType t = player.inventory.getItemTypeInWearSlot(slot); if (t == null) continue; ItemTraits_OnEquip equipEffects = t.effects_equip; if (equipEffects == null) continue; if (equipEffects.addedConditions == null) continue; for (ActorConditionEffect e : equipEffects.addedConditions) { if (!e.conditionType.conditionTypeID.equals(type.conditionTypeID)) continue; if (e.duration != duration) continue; // The player is wearing some other item that gives this condition. It will not be removed // now. return; } } removeStackableActorCondition(player, type, magnitude, duration); }