Buffer message when no souls for simulacrum

This commit is contained in:
2025-02-26 08:15:40 -06:00
committed by Celtic Minstrel
parent 36a9c237d7
commit f2869494bb
3 changed files with 13 additions and 0 deletions

View File

@@ -4761,6 +4761,11 @@ bool combat_cast_mage_spell() {
}
if(spell_num == eSpell::SIMULACRUM) {
if(!has_trapped_monst()){
add_string_to_buf("Simulacrum: You need to cast Capture\n");
add_string_to_buf(" Soul on a creature first.");
return false;
}
store_sum_monst = pick_trapped_monst();
if(store_sum_monst == 0)
return false;

View File

@@ -2278,6 +2278,13 @@ bool pick_pc_name(short pc_num,cDialog* parent) {
return 1;
}
bool has_trapped_monst() {
for(mon_num_t which : univ.party.imprisoned_monst) {
if(which != 0) return true;
}
return false;
}
mon_num_t pick_trapped_monst() {
short i = 0;
std::string sp;

View File

@@ -33,6 +33,7 @@ void do_alchemy();
eAlchemy alch_choice(short pc_num);
bool pick_pc_graphic(short pc_num,short mode,cDialog* parent_num);
bool pick_pc_name(short pc_num,cDialog* parent) ;
bool has_trapped_monst();
mon_num_t pick_trapped_monst();
bool flying() ;
void hit_party(short how_much,eDamageType damage_type,short snd_type = 0);