New special nodes:
- Town set attitude for affecting single creature, adapted from Windows code; technically redundant, but maybe handy - If numeric response - Print nums (for debugging) - SDF arithmetic - add, subtract, multiply, divide, exponentiate - Store random to SDF (adapted from Windows code) - Display picture (inspired by Windows code, but the implementation is completely different and totally incompatible)
This commit is contained in:
@@ -554,10 +554,10 @@ enum class eSpecType {
|
||||
SECRET_PASSAGE = 4,
|
||||
DISPLAY_SM_MSG = 5,
|
||||
FLIP_SDF = 6,
|
||||
UNUSED1 = 7, // formerly OUT_BLOCK
|
||||
UNUSED2 = 8, // formerly TOWN_BLOCK
|
||||
UNUSED3 = 9, // formerly FIGHT_BLOCK
|
||||
UNUSED4 = 10, // formerly LOOK_BLOCK
|
||||
SDF_RANDOM = 7, // formerly OUT_BLOCK
|
||||
SDF_ADD = 8, // formerly TOWN_BLOCK
|
||||
SDF_DIFF = 9, // formerly FIGHT_BLOCK
|
||||
UNUSED1 = 10, // formerly LOOK_BLOCK
|
||||
CANT_ENTER = 11,
|
||||
CHANGE_TIME = 12,
|
||||
SCEN_TIMER_START = 13,
|
||||
@@ -571,12 +571,16 @@ enum class eSpecType {
|
||||
CALL_GLOBAL = 21,
|
||||
SET_SDF_ROW = 22,
|
||||
COPY_SDF = 23,
|
||||
UNUSED6 = 24, // formerly SANCTIFY
|
||||
DISPLAY_PICTURE = 24, // formerly SANCTIFY
|
||||
REST = 25,
|
||||
WANDERING_WILL_FIGHT = 26,
|
||||
END_SCENARIO = 27,
|
||||
SET_POINTER = 28,
|
||||
SET_CAMP_FLAG = 29,
|
||||
PRINT_NUMS = 30, // For debugging
|
||||
SDF_TIMES = 31,
|
||||
SDF_DIVIDE = 32, // Computes both quotient and remainder
|
||||
SDF_POWER = 33,
|
||||
ONCE_GIVE_ITEM = 50,
|
||||
ONCE_GIVE_SPEC_ITEM = 51,
|
||||
ONCE_NULL = 52,
|
||||
@@ -645,6 +649,7 @@ enum class eSpecType {
|
||||
IF_TEXT_RESPONSE = 154,
|
||||
IF_SDF_EQ = 155,
|
||||
IF_CONTEXT = 156,
|
||||
IF_NUM_RESPONSE = 157,
|
||||
MAKE_TOWN_HOSTILE = 170,
|
||||
TOWN_CHANGE_TER = 171,
|
||||
TOWN_SWAP_TER = 172,
|
||||
@@ -672,6 +677,7 @@ enum class eSpecType {
|
||||
TOWN_REUNITE_PARTY = 194,
|
||||
TOWN_TIMER_START = 195,
|
||||
TOWN_CHANGE_LIGHTING = 196,
|
||||
TOWN_SET_ATTITUDE = 197,
|
||||
RECT_PLACE_FIRE = 200,
|
||||
RECT_PLACE_FORCE = 201,
|
||||
RECT_PLACE_ICE = 202,
|
||||
@@ -705,15 +711,15 @@ enum class eSpecCat {
|
||||
|
||||
inline eSpecCat getNodeCategory(eSpecType node) {
|
||||
int code = (int) node;
|
||||
if(code >= 0 && code <= 29)
|
||||
if(code >= 0 && code <= 33)
|
||||
return eSpecCat::GENERAL;
|
||||
if(code >= 50 && code <= 63)
|
||||
return eSpecCat::ONCE;
|
||||
if(code >= 80 && code <= 106)
|
||||
return eSpecCat::AFFECT;
|
||||
if(code >= 130 && code <= 156)
|
||||
if(code >= 130 && code <= 157)
|
||||
return eSpecCat::IF_THEN;
|
||||
if(code >= 170 && code <= 196)
|
||||
if(code >= 170 && code <= 197)
|
||||
return eSpecCat::TOWN;
|
||||
if(code >= 200 && code <= 218)
|
||||
return eSpecCat::RECT;
|
||||
|
@@ -11,6 +11,7 @@
|
||||
#include <map>
|
||||
#include <sstream>
|
||||
|
||||
#include "dlogutil.h"
|
||||
#include "classes.h"
|
||||
#include "oldstructs.h"
|
||||
|
||||
@@ -80,13 +81,41 @@ cSpecial& cSpecial::operator = (legacy::special_node_type& old){
|
||||
break;
|
||||
case 153: // if enough mage lore
|
||||
type = eSpecType::IF_STATISTIC;
|
||||
ex2a = 11;
|
||||
if(ex2a >= 0) { // Windows version added "if statistic" much earlier, but it still needs a little conversion.
|
||||
switch(ex2a) {
|
||||
case 20: ex2a = 19; break; // Max HP
|
||||
case 22: ex2a = 20; break; // Max SP
|
||||
case 19: ex2a = 100; break; // Current HP
|
||||
case 21: ex2a = 101; break; // Current SP
|
||||
case 23: ex2a = 102; break; // Experience
|
||||
case 24: ex2a = 103; break; // Skill points
|
||||
case 25: ex2a = 104; break; // Level
|
||||
}
|
||||
} else ex2a = 11;
|
||||
ex2b = 0;
|
||||
break;
|
||||
case 229: // Outdoor store - fix spell IDs
|
||||
if(ex1b == 1 || ex1b == 2)
|
||||
ex1a += 30;
|
||||
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;
|
||||
giveError("Warning: This scenario contains a Display Picture special node created by the 'Classic Windows' version of the game. Although this version of the game also supports a Display Picture node, the format is incompatible, and automatic conversion is impossible.", "If this is not your scenario, consider contacting the scenario designer to get this fixed.");
|
||||
ex1a = 0;
|
||||
break;
|
||||
case 29:
|
||||
type = eSpecType::SDF_RANDOM;
|
||||
break;
|
||||
case 156:
|
||||
type = eSpecType::IF_SPECIES;
|
||||
break;
|
||||
case 196:
|
||||
type = eSpecType::TOWN_CHANGE_LIGHTING;
|
||||
break;
|
||||
case 197:
|
||||
type = eSpecType::TOWN_SET_ATTITUDE;
|
||||
break;
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
Reference in New Issue
Block a user