Minor changes
- Implement terrains destroyable by quickfire - Rename is_weapon() to better reflect its use
This commit is contained in:
@@ -4931,6 +4931,13 @@ void process_fields() {
|
|||||||
for(i = r.left + 1; i < r.right ; i++)
|
for(i = r.left + 1; i < r.right ; i++)
|
||||||
for(j = r.top + 1; j < r.bottom ; j++)
|
for(j = r.top + 1; j < r.bottom ; j++)
|
||||||
if(qf[i][j] > 0) {
|
if(qf[i][j] > 0) {
|
||||||
|
ter_num_t ter = univ.town->terrain(i,j);
|
||||||
|
if(univ.scenario.ter_types[ter].special == eTerSpec::CRUMBLING && univ.scenario.ter_types[ter].flag3.u > 0) {
|
||||||
|
// TODO: This seems like the wrong sound
|
||||||
|
play_sound(60);
|
||||||
|
univ.town->terrain(i,j) = univ.scenario.ter_types[ter].flag1.u;
|
||||||
|
add_string_to_buf(" Quickfire burns through barrier.");
|
||||||
|
}
|
||||||
univ.town.set_quickfire(i,j,true);
|
univ.town.set_quickfire(i,j,true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1318,7 +1318,7 @@ static bool connect_roads(ter_num_t ter){
|
|||||||
|
|
||||||
void place_road(short q,short r,location where, bool here) {
|
void place_road(short q,short r,location where, bool here) {
|
||||||
location draw_loc;
|
location draw_loc;
|
||||||
ter_num_t ter;
|
ter_num_t ter = coord_to_ter(where.x, where.y);
|
||||||
rectangle to_rect;
|
rectangle to_rect;
|
||||||
//rectangle road_rects[2] = {{76,112,80,125},{72,144,90,148}}; // 0 - rl partial 1 - ud partial
|
//rectangle road_rects[2] = {{76,112,80,125},{72,144,90,148}}; // 0 - rl partial 1 - ud partial
|
||||||
// TODO: The duplication of rectangle here shouldn't be necessary...
|
// TODO: The duplication of rectangle here shouldn't be necessary...
|
||||||
|
|||||||
@@ -670,9 +670,10 @@ bool poison_weapon( short pc_num, short how_much,short safe) {
|
|||||||
short p_chance[21] = {
|
short p_chance[21] = {
|
||||||
40,72,81,85,88,89,90,
|
40,72,81,85,88,89,90,
|
||||||
91,92,93,94,94,95,95,96,97,98,100,100,100,100};
|
91,92,93,94,94,95,95,96,97,98,100,100,100,100};
|
||||||
|
// TODO: This doesn't allow you to choose between poisoning a melee weapon and poisoning arrows, except by temporarily dequipping one
|
||||||
|
|
||||||
for(i = 0; i < 24; i++)
|
for(i = 0; i < 24; i++)
|
||||||
if((univ.party[pc_num].equip[i]) && (is_weapon(pc_num,i))) {
|
if((univ.party[pc_num].equip[i]) && (is_poisonable_weap(pc_num,i))) {
|
||||||
weap = i;
|
weap = i;
|
||||||
i = 30;
|
i = 30;
|
||||||
}
|
}
|
||||||
@@ -705,8 +706,7 @@ bool poison_weapon( short pc_num, short how_much,short safe) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool is_weapon(short pc_num,short item) {
|
bool is_poisonable_weap(short pc_num,short item) {
|
||||||
// TODO: Uh, why aren't bows, crossbows, thrown missiles, no-ammo missiles included? (There's probably a reason though.)
|
|
||||||
if((univ.party[pc_num].items[item].variety == eItemType::ONE_HANDED) ||
|
if((univ.party[pc_num].items[item].variety == eItemType::ONE_HANDED) ||
|
||||||
(univ.party[pc_num].items[item].variety == eItemType::TWO_HANDED) ||
|
(univ.party[pc_num].items[item].variety == eItemType::TWO_HANDED) ||
|
||||||
(univ.party[pc_num].items[item].variety == eItemType::ARROW) ||
|
(univ.party[pc_num].items[item].variety == eItemType::ARROW) ||
|
||||||
@@ -1558,7 +1558,7 @@ bool cast_spell_on_space(location where, eSpell spell) {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void crumble_wall(location where) { // TODO: Add something like this to the spreading quickfire function
|
void crumble_wall(location where) {
|
||||||
ter_num_t ter;
|
ter_num_t ter;
|
||||||
|
|
||||||
if(loc_off_act_area(where))
|
if(loc_off_act_area(where))
|
||||||
@@ -1835,10 +1835,6 @@ static void draw_spell_pc_info(cDialog& me) {
|
|||||||
std::string n = boost::lexical_cast<std::string>(i + 1);
|
std::string n = boost::lexical_cast<std::string>(i + 1);
|
||||||
if(univ.party[i].main_status != eMainStatus::ABSENT) {
|
if(univ.party[i].main_status != eMainStatus::ABSENT) {
|
||||||
me["pc" + n].setText(univ.party[i].name);
|
me["pc" + n].setText(univ.party[i].name);
|
||||||
// TODO: Maybe this detail should be reimplemented?
|
|
||||||
//if(pc_casting == i)
|
|
||||||
// cd_text_frame(1098,24 + store_spell_target,11);
|
|
||||||
//else cd_text_frame(1098,24 + store_spell_target,1);
|
|
||||||
|
|
||||||
if(univ.party[i].main_status == eMainStatus::ALIVE) {
|
if(univ.party[i].main_status == eMainStatus::ALIVE) {
|
||||||
me["hp" + n].setTextToNum(univ.party[i].cur_health);
|
me["hp" + n].setTextToNum(univ.party[i].cur_health);
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ void award_xp(short pc_num,short amt);
|
|||||||
void drain_pc(short which_pc,short how_much);
|
void drain_pc(short which_pc,short how_much);
|
||||||
short check_party_stat(eSkill which_stat, short mode);
|
short check_party_stat(eSkill which_stat, short mode);
|
||||||
bool poison_weapon( short pc_num, short how_much,short safe);
|
bool poison_weapon( short pc_num, short how_much,short safe);
|
||||||
bool is_weapon(short pc_num,short item);
|
bool is_poisonable_weap(short pc_num,short item);
|
||||||
void cast_spell(eSkill type);
|
void cast_spell(eSkill type);
|
||||||
bool repeat_cast_ok(eSkill type);
|
bool repeat_cast_ok(eSkill type);
|
||||||
void give_party_spell(short which);
|
void give_party_spell(short which);
|
||||||
|
|||||||
Reference in New Issue
Block a user