Try recast opposite spell type: Toggle the hint

This commit is contained in:
2025-01-20 14:42:40 -06:00
parent cbb964a073
commit 7742373142
2 changed files with 16 additions and 4 deletions

View File

@@ -266,6 +266,14 @@ void handle_spellcast(eSkill which_type, bool& did_something, bool& need_redraw,
short store_sp[6]; short store_sp[6];
extern short spec_target_fail; extern short spec_target_fail;
extern eSpecCtxType spec_target_type; extern eSpecCtxType spec_target_type;
// Dual-caster recast hint toggle:
// Change the recast hint to mage if last spell wasn't mage
if(spell_forced && is_combat() && univ.current_pc().last_cast_type != which_type){
spell_forced = false;
univ.current_pc().last_cast_type = which_type;
need_redraw = true;
return;
}
if(!someone_awake()) { if(!someone_awake()) {
ASB("Everyone's asleep/paralyzed."); ASB("Everyone's asleep/paralyzed.");
need_reprint = true; need_reprint = true;

View File

@@ -634,12 +634,16 @@ void draw_text_bar() {
} }
if(!hint_prefix.empty()){ if(!hint_prefix.empty()){
hint_out << hint_prefix << ": "; hint_out << hint_prefix << ": ";
if(current_pc.last_cast[type] != eSpell::NONE){
const cSpell& spell = (*current_pc.last_cast[type]); const cSpell& spell = (*current_pc.last_cast[type]);
if(pc_can_cast_spell(current_pc,type) && spell.cost <= current_pc.get_magic()) { if(pc_can_cast_spell(current_pc,type) && spell.cost <= current_pc.get_magic()) {
hint_out << "Recast " << spell.name(); hint_out << "Recast " << spell.name();
}else{ }else{
hint_out << "Cannot recast"; hint_out << "Cannot recast";
} }
}else{
hint_out << "No spell to recast";
}
} }
put_text_bar(sout.str(), hint_out.str()); put_text_bar(sout.str(), hint_out.str());