Add new booms by ADoS
- Single-frame boom for "weird" damage - Animated booms for "weird" and ice damage - Magic now uses blue swirl instead of yellow swirl; yellow swirl is currently unused
This commit is contained in:
Binary file not shown.
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 20 KiB |
@@ -1473,7 +1473,7 @@ void boom_space(location where,short mode,short type,short damage,short sound) {
|
|||||||
// return;
|
// return;
|
||||||
if((mode != 100) && (party_can_see(where) == 6))
|
if((mode != 100) && (party_can_see(where) == 6))
|
||||||
return;
|
return;
|
||||||
if((type < 0) || (type > 4))
|
if(type < 0 || type > 5)
|
||||||
return;
|
return;
|
||||||
if((boom_anim_active) && (type != 3))
|
if((boom_anim_active) && (type != 3))
|
||||||
return;
|
return;
|
||||||
|
@@ -518,7 +518,7 @@ void do_explosion_anim(short /*sound_num*/,short special_draw, short snd) {
|
|||||||
|
|
||||||
short t,cur_boom_type = 0;
|
short t,cur_boom_type = 0;
|
||||||
location current_terrain_ul;
|
location current_terrain_ul;
|
||||||
short boom_type_sound[4] = {5,10,53,53};
|
short boom_type_sound[6] = {5,10,53,53,53,75};
|
||||||
|
|
||||||
if(!have_boom || !boom_anim_active) {
|
if(!have_boom || !boom_anim_active) {
|
||||||
boom_anim_active = false;
|
boom_anim_active = false;
|
||||||
@@ -576,7 +576,7 @@ void do_explosion_anim(short /*sound_num*/,short special_draw, short snd) {
|
|||||||
|
|
||||||
if(special_draw < 2) {
|
if(special_draw < 2) {
|
||||||
snd_num_t snd_num = snd;
|
snd_num_t snd_num = snd;
|
||||||
if(snd == -1 && cur_boom_type < 4)
|
if(snd == -1 && cur_boom_type < 6)
|
||||||
snd_num = boom_type_sound[cur_boom_type];
|
snd_num = boom_type_sound[cur_boom_type];
|
||||||
play_sound(-1 * snd_num);
|
play_sound(-1 * snd_num);
|
||||||
}
|
}
|
||||||
|
@@ -2522,8 +2522,10 @@ bool damage_pc(cPlayer& which_pc,short how_much,eDamageType damage_type,eRace ty
|
|||||||
short boom_type = 2;
|
short boom_type = 2;
|
||||||
if(damage_type == eDamageType::FIRE)
|
if(damage_type == eDamageType::FIRE)
|
||||||
boom_type = 0;
|
boom_type = 0;
|
||||||
else if(damage_type == eDamageType::MAGIC)
|
else if(damage_type == eDamageType::UNBLOCKABLE)
|
||||||
boom_type = 3;
|
boom_type = 4;
|
||||||
|
else if(damage_type == eDamageType::COLD)
|
||||||
|
boom_type = 5;
|
||||||
if(is_town())
|
if(is_town())
|
||||||
add_explosion(univ.town.p_loc,how_much,0,boom_type,0,0);
|
add_explosion(univ.town.p_loc,how_much,0,boom_type,0,0);
|
||||||
else add_explosion(which_pc.combat_pos,how_much,0,boom_type,0,0);
|
else add_explosion(which_pc.combat_pos,how_much,0,boom_type,0,0);
|
||||||
|
@@ -58,7 +58,7 @@ std::map<eDamageType,int> boom_gr = {
|
|||||||
{eDamageType::FIRE, 0},
|
{eDamageType::FIRE, 0},
|
||||||
{eDamageType::POISON, 2},
|
{eDamageType::POISON, 2},
|
||||||
{eDamageType::MAGIC, 1},
|
{eDamageType::MAGIC, 1},
|
||||||
{eDamageType::UNBLOCKABLE, 1},
|
{eDamageType::UNBLOCKABLE, 5},
|
||||||
{eDamageType::COLD, 4},
|
{eDamageType::COLD, 4},
|
||||||
{eDamageType::UNDEAD, 3},
|
{eDamageType::UNDEAD, 3},
|
||||||
{eDamageType::DEMON, 3},
|
{eDamageType::DEMON, 3},
|
||||||
@@ -1469,12 +1469,13 @@ bool damage_monst(cCreature& victim, short who_hit, short how_much, eDamageType
|
|||||||
if(boom_anim_active) {
|
if(boom_anim_active) {
|
||||||
if(how_much < 0)
|
if(how_much < 0)
|
||||||
how_much = 0;
|
how_much = 0;
|
||||||
// It would also be nice to have a special boom type for cold.
|
|
||||||
short boom_type = 2;
|
short boom_type = 2;
|
||||||
if(dam_type == eDamageType::FIRE)
|
if(dam_type == eDamageType::FIRE)
|
||||||
boom_type = 0;
|
boom_type = 0;
|
||||||
else if(dam_type == eDamageType::MAGIC)
|
else if(dam_type == eDamageType::UNBLOCKABLE)
|
||||||
boom_type = 3;
|
boom_type = 4;
|
||||||
|
else if(dam_type == eDamageType::COLD)
|
||||||
|
boom_type = 5;
|
||||||
victim.marked_damage += how_much;
|
victim.marked_damage += how_much;
|
||||||
add_explosion(victim.cur_loc,how_much,0,boom_type,14 * (victim.x_width - 1),18 * (victim.y_width - 1));
|
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.
|
// Note: Windows version printed an "undamaged" message here if applicable, but I don't think that's right.
|
||||||
|
@@ -25,7 +25,7 @@ extern cOutdoors* current_terrain;
|
|||||||
extern cCustomGraphics spec_scen_g;
|
extern cCustomGraphics spec_scen_g;
|
||||||
|
|
||||||
std::vector<pic_num_t> field_pics = {0,3,5,6,7,8,9,10,11,12,13,14,15,24,25,26,27,28,29,30,31};
|
std::vector<pic_num_t> field_pics = {0,3,5,6,7,8,9,10,11,12,13,14,15,24,25,26,27,28,29,30,31};
|
||||||
std::vector<pic_num_t> boom_pics = {0,1,2,3,4};
|
std::vector<pic_num_t> boom_pics = {0,1,2,3,4,5};
|
||||||
std::vector<pic_num_t> lgdlog_pics = {0,32};
|
std::vector<pic_num_t> lgdlog_pics = {0,32};
|
||||||
|
|
||||||
size_t num_strs(eStrMode str_mode) {
|
size_t num_strs(eStrMode str_mode) {
|
||||||
@@ -722,7 +722,7 @@ short choose_field_type(short cur, cDialog* parent, bool includeSpec) {
|
|||||||
|
|
||||||
pic_num_t choose_damage_type(short cur, cDialog* parent, bool allow_spec) {
|
pic_num_t choose_damage_type(short cur, cDialog* parent, bool allow_spec) {
|
||||||
static const char*const damageNames[] = {"Weapon", "Fire", "Poison", "Magic", "Weird", "Cold", "Undead", "Demon", "Unblockable"};
|
static const char*const damageNames[] = {"Weapon", "Fire", "Poison", "Magic", "Weird", "Cold", "Undead", "Demon", "Unblockable"};
|
||||||
static const std::vector<pic_num_t> pics = {3,0,2,1,1,4,3,3,1};
|
static const std::vector<pic_num_t> pics = {3,0,2,1,5,4,3,3,1};
|
||||||
short prev = cur;
|
short prev = cur;
|
||||||
if(cur < 0 || cur >= pics.size()) cur = 0;
|
if(cur < 0 || cur >= pics.size()) cur = 0;
|
||||||
cPictChoice pic_dlg(pics.begin(), pics.end() - !allow_spec, PIC_BOOM, parent);
|
cPictChoice pic_dlg(pics.begin(), pics.end() - !allow_spec, PIC_BOOM, parent);
|
||||||
@@ -737,8 +737,12 @@ pic_num_t choose_damage_type(short cur, cDialog* parent, bool allow_spec) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static pic_num_t choose_boom_type(short cur, cDialog* parent) {
|
static pic_num_t choose_boom_type(short cur, cDialog* parent) {
|
||||||
static const int preset_booms = 4;
|
static const int preset_booms = 6;
|
||||||
static const char*const boomNames[preset_booms+1] = {"Fire", "Teleport", "Magic/Cold/Electricity", "Magic/Electricity", "Custom Explosion"};
|
static const char*const boomNames[preset_booms+1] = {
|
||||||
|
"Fire", "Teleport", "Magic/Electricity",
|
||||||
|
"Magic/Electricity", "Weird", "Cold",
|
||||||
|
"Custom Explosion"
|
||||||
|
};
|
||||||
std::vector<pic_num_t> pics;
|
std::vector<pic_num_t> pics;
|
||||||
for(int i = 0; i < preset_booms; i++) pics.push_back(i + 8);
|
for(int i = 0; i < preset_booms; i++) pics.push_back(i + 8);
|
||||||
for(int i = 0; i < scenario.custom_graphics.size(); i++) {
|
for(int i = 0; i < scenario.custom_graphics.size(); i++) {
|
||||||
|
Reference in New Issue
Block a user