Use the extra boom type for magic damage and add special node support for super-huge booms

(Like the one when you destroy a slime pool in Exile III.)
This commit is contained in:
2015-01-26 19:31:52 -05:00
parent 7e341be73d
commit d0ea2064c5
4 changed files with 10 additions and 6 deletions

View File

@@ -154,7 +154,7 @@ X coordinate of space
Y coordinate of space
Unused
0 - fire, 1 - elec., 2 - telep.
Unused
0 - normal, 1 - huge
Unused
Special to Jump To
--------------------

View File

@@ -526,7 +526,7 @@ void do_explosion_anim(short /*sound_num*/,short special_draw) {
short t,cur_boom_type = 0;
location current_terrain_ul;
short boom_type_sound[3] = {5,10,53};
short boom_type_sound[4] = {5,10,53,53};
if(!have_boom || !boom_anim_active) {
boom_anim_active = false;

View File

@@ -2614,11 +2614,12 @@ bool damage_pc(short which_pc,short how_much,eDamageType damage_type,eRace type_
if(how_much < 0)
how_much = 0;
univ.party[which_pc].marked_damage += how_much;
// TODO: Also, if it's magic, use boom type 3 (must implement in the animation engine first)
// It would also be nice to have a special boom type for cold.
short boom_type = 2;
if(damage_type == eDamageType::FIRE)
boom_type = 0;
else if(damage_type == eDamageType::MAGIC)
boom_type = 3;
if(is_town())
add_explosion(univ.town.p_loc,how_much,0,boom_type,0,0);
else add_explosion(univ.party[which_pc].combat_pos,how_much,0,boom_type,0,0);

View File

@@ -1408,11 +1408,12 @@ bool damage_monst(short which_m, short who_hit, short how_much, eDamageType dam_
if(boom_anim_active) {
if(how_much < 0)
how_much = 0;
// TODO: Also, if it's magic, use boom type 3 (must implement in the animation engine first)
// It would also be nice to have a special boom type for cold.
short boom_type = 2;
if(dam_type == eDamageType::FIRE)
boom_type = 0;
else if(dam_type == eDamageType::MAGIC)
boom_type = 3;
univ.town.monst[which_m].marked_damage += how_much;
add_explosion(victim->cur_loc,how_much,0,boom_type,14 * (victim->x_width - 1),18 * (victim->y_width - 1));
// Note: Windows version printed an "undamaged" message here if applicable, but I don't think that's right.
@@ -3587,10 +3588,12 @@ void townmode_spec(eSpecCtx which_mode,cSpecial cur_node,short cur_spec_type,
set_terrain(l,univ.scenario.ter_types[ter].flag1.u);
*redraw = 1;
break;
case eSpecType::TOWN_SFX_BURST: // TODO: Add a "random offset" mode
case eSpecType::TOWN_SFX_BURST:
if(which_mode == eSpecCtx::TALK)
break;
run_a_boom(l,spec.ex2a,0,0);
if(spec.ex2b == 1)
mondo_boom(l,spec.ex2a);
else run_a_boom(l,spec.ex2a,0,0);
break;
case eSpecType::TOWN_CREATE_WANDERING:
create_wand_monst();