Enable spellcasting items to work with spells that require a PC target
In particular, this allows Nirvana and Augmentation to work.
This commit is contained in:
@@ -66,6 +66,7 @@ std::map<eDamageType,int> boom_gr = {
|
||||
{eDamageType::SPECIAL, 1},
|
||||
};
|
||||
short store_item_spell_level = 10;
|
||||
extern short store_spell_target;
|
||||
|
||||
// global values for when processing special encounters
|
||||
iLiving* current_pc_picked_in_spec_enc = nullptr;
|
||||
@@ -1076,6 +1077,11 @@ void use_item(short pc,short item) {
|
||||
case eSpell::ANTIMAGIC: add_string_to_buf(" Your hair stands on end."); break;
|
||||
default: add_string_to_buf(" It casts a spell: " + (*spell).name()); break;
|
||||
}
|
||||
switch((*spell).need_select) {
|
||||
case SELECT_NO: break;
|
||||
case SELECT_ACTIVE: store_spell_target = select_pc(0); break;
|
||||
case SELECT_ANY: store_spell_target = select_pc(1); break;
|
||||
}
|
||||
if(overall_mode == MODE_COMBAT) {
|
||||
bool priest = (*spell).is_priest();
|
||||
switch((*spell).refer) {
|
||||
|
Reference in New Issue
Block a user