Generalize the special node types dealing with fields.
- IF_FIELDS (formerly IF_OBJECTS) can now deal with any kind of field (apart from special spots, which aren't technically a field but share some implementation details). - The twelve RECT_PLACE_XXX field nodes (well, one of them was RECT_CLEANSE) have been collapsed into one, allowing the placement of any kind of field (apart from special spots). In particular, antimagic fields can now be placed! (There wasn't a node for them before.) As a bonus, since it exists in the field type enum, RECT_PLACE_FIELDS can also smash fragile wall terrains (like the Move Mountains spell).
This commit is contained in:
@@ -72,8 +72,8 @@ void cSpecial::append(legacy::special_node_type& old){
|
||||
ex1b = 1; // Meaning give spell, not take
|
||||
break;
|
||||
case 148: case 149: // if barrels or crates
|
||||
type = eSpecType::IF_OBJECTS;
|
||||
ex1a = old.type - 148;
|
||||
type = eSpecType::IF_FIELDS;
|
||||
ex1a = old.type == 148 ? OBJECT_BARREL : OBJECT_CRATE;
|
||||
break;
|
||||
case 151: case 152: // if has cave lore or woodsman
|
||||
type = eSpecType::IF_TRAIT;
|
||||
@@ -98,6 +98,59 @@ void cSpecial::append(legacy::special_node_type& old){
|
||||
if(ex1b == 1 || ex1b == 2)
|
||||
ex1a += 30;
|
||||
break;
|
||||
// Place fields (twelve individual node types were collapsed into one)
|
||||
case 200:
|
||||
type = eSpecType::RECT_PLACE_FIELD;
|
||||
sd2 = WALL_FIRE;
|
||||
break;
|
||||
case 201:
|
||||
type = eSpecType::RECT_PLACE_FIELD;
|
||||
sd2 = WALL_FORCE;
|
||||
break;
|
||||
case 202:
|
||||
type = eSpecType::RECT_PLACE_FIELD;
|
||||
sd2 = WALL_ICE;
|
||||
break;
|
||||
case 203:
|
||||
type = eSpecType::RECT_PLACE_FIELD;
|
||||
sd2 = WALL_BLADES;
|
||||
break;
|
||||
case 204:
|
||||
type = eSpecType::RECT_PLACE_FIELD;
|
||||
sd2 = CLOUD_STINK;
|
||||
break;
|
||||
case 205:
|
||||
type = eSpecType::RECT_PLACE_FIELD;
|
||||
sd2 = CLOUD_SLEEP;
|
||||
break;
|
||||
case 206:
|
||||
type = eSpecType::RECT_PLACE_FIELD;
|
||||
sd2 = FIELD_QUICKFIRE;
|
||||
break;
|
||||
case 207:
|
||||
type = eSpecType::RECT_PLACE_FIELD;
|
||||
sd2 = BARRIER_FIRE;
|
||||
break;
|
||||
case 208:
|
||||
type = eSpecType::RECT_PLACE_FIELD;
|
||||
sd2 = BARRIER_FORCE;
|
||||
break;
|
||||
case 209:
|
||||
type = eSpecType::RECT_PLACE_FIELD;
|
||||
sd2 = FIELD_DISPEL;
|
||||
break;
|
||||
case 210:
|
||||
type = eSpecType::RECT_PLACE_FIELD;
|
||||
sd2 += SFX_SMALL_BLOOD;
|
||||
break;
|
||||
case 211:
|
||||
type = eSpecType::RECT_PLACE_FIELD;
|
||||
switch(old.sd2) {
|
||||
case 0: sd2 = FIELD_WEB; break;
|
||||
case 1: sd2 = OBJECT_BARREL; break;
|
||||
case 2: sd2 = OBJECT_CRATE; break;
|
||||
}
|
||||
break;
|
||||
// These are ones that were added in the Windows version but only recently added to the Mac version.
|
||||
case 28:
|
||||
type = eSpecType::DISPLAY_PICTURE;
|
||||
@@ -257,7 +310,7 @@ const std::map<eSpecType, node_properties_t> allNodeProps = {
|
||||
{eSpecType::IF_HAVE_ITEM_CLASS_AND_TAKE, {ex1b_ch = true,jmp_lbl = 3}},
|
||||
{eSpecType::IF_EQUIP_ITEM_CLASS_AND_TAKE, {ex1b_ch = true,jmp_lbl = 3}},
|
||||
{eSpecType::IF_DAY_REACHED, {ex1b_ch = true,jmp_lbl = 3}},
|
||||
{eSpecType::IF_OBJECTS, {ex1b_ch = true,jmp_lbl = 3}},
|
||||
{eSpecType::IF_FIELDS, {ex1b_ch = true,jmp_lbl = 3}},
|
||||
{eSpecType::IF_EVENT_OCCURRED, {ex1b_ch = true,jmp_lbl = 3}},
|
||||
{eSpecType::IF_SPECIES, {ex1b_ch = true,jmp_lbl = 3}},
|
||||
{eSpecType::IF_TRAIT, {ex1b_ch = true,jmp_lbl = 3}},
|
||||
@@ -291,18 +344,7 @@ const std::map<eSpecType, node_properties_t> allNodeProps = {
|
||||
{eSpecType::TOWN_SPLIT_PARTY, {msg_lbl = 1}},
|
||||
{eSpecType::TOWN_REUNITE_PARTY, {msg_lbl = 1}},
|
||||
{eSpecType::TOWN_TIMER_START, {ex1b_ch = true,msg_lbl = 1}},
|
||||
{eSpecType::RECT_PLACE_FIRE, {sdf_lbl = 2,msg_lbl = 1}},
|
||||
{eSpecType::RECT_PLACE_FORCE, {sdf_lbl = 2,msg_lbl = 1}},
|
||||
{eSpecType::RECT_PLACE_ICE, {sdf_lbl = 2,msg_lbl = 1}},
|
||||
{eSpecType::RECT_PLACE_BLADE, {sdf_lbl = 2,msg_lbl = 1}},
|
||||
{eSpecType::RECT_PLACE_SCLOUD, {sdf_lbl = 2,msg_lbl = 1}},
|
||||
{eSpecType::RECT_PLACE_SLEEP, {sdf_lbl = 2,msg_lbl = 1}},
|
||||
{eSpecType::RECT_PLACE_QUICKFIRE, {sdf_lbl = 2,msg_lbl = 1}},
|
||||
{eSpecType::RECT_PLACE_FIRE_BARR, {sdf_lbl = 2,msg_lbl = 1}},
|
||||
{eSpecType::RECT_PLACE_FORCE_BARR, {sdf_lbl = 2,msg_lbl = 1}},
|
||||
{eSpecType::RECT_CLEANSE, {sdf_lbl = 2,msg_lbl = 1}},
|
||||
{eSpecType::RECT_PLACE_SFX, {sdf_lbl = 7,msg_lbl = 1}},
|
||||
{eSpecType::RECT_PLACE_OBJECT, {sdf_lbl = 8,msg_lbl = 1}},
|
||||
{eSpecType::RECT_PLACE_FIELD, {sdf_lbl = 2,msg_lbl = 1}},
|
||||
{eSpecType::RECT_MOVE_ITEMS, {sdf_lbl = 4,msg_lbl = 1}},
|
||||
{eSpecType::RECT_DESTROY_ITEMS, {msg_lbl = 1}},
|
||||
{eSpecType::RECT_CHANGE_TER, {sdf_lbl = 5,msg_lbl = 1}},
|
||||
|
||||
Reference in New Issue
Block a user