Initial reformation of item abilities

- Merge most of the spell usable abilities into a single "cast spell" ability which can take any spell as an additional parameter
- Merge the affect status usable abilities into a single "affect status" ability which can take any status as an additional parameter
- Merge acidic and poisoned weapon into a single "status weapon" ability which can take any status as an additional parameter (though the handling for other statuses isn't yet implemented)
- Fix mass charm spell getting worse as you intelligence bonus increases
- Mass charm item spell is now easier to resist (an unintended side-effect)
- PC versions of Wrack and Unholy Ravaging implemented (for use as item spells)
This commit is contained in:
2015-01-12 21:17:44 -05:00
parent 3a285f47da
commit 25ef2ed713
15 changed files with 778 additions and 368 deletions

View File

@@ -958,7 +958,7 @@ static void put_item_abils_in_dlog(cDialog& me, cItem& store_item, short which_i
dynamic_cast<cLedGroup&>(me["use-type"]).setSelected("use" + std::to_string(store_item.magic_use_type));
dynamic_cast<cLedGroup&>(me["treasure"]).setSelected("type" + std::to_string(store_item.treas_class));
me["str"].setTextToNum(store_item.ability_strength);
me["str"].setTextToNum(store_item.abil_data[0]);
dynamic_cast<cLed&>(me["always-id"]).setState(store_item.ident ? led_red : led_off);
dynamic_cast<cLed&>(me["magic"]).setState(store_item.magic ? led_red : led_off);
@@ -969,7 +969,7 @@ static void put_item_abils_in_dlog(cDialog& me, cItem& store_item, short which_i
static bool save_item_abils(cDialog& me, cItem& store_item) {
store_item.magic_use_type = boost::lexical_cast<short>(dynamic_cast<cLedGroup&>(me["use-type"]).getSelected().substr(3));
store_item.treas_class = boost::lexical_cast<short>(dynamic_cast<cLedGroup&>(me["treasure"]).getSelected().substr(4));
store_item.ability_strength = me["str"].getTextAsNum();
store_item.abil_data[0] = me["str"].getTextAsNum();
store_item.property = store_item.enchanted = store_item.contained = false;
store_item.ident = dynamic_cast<cLed&>(me["always-id"]).getState() != led_off;