diff --git a/doc/scripts/unittype.html b/doc/scripts/unittype.html index 21d996cbb..dcce142aa 100644 --- a/doc/scripts/unittype.html +++ b/doc/scripts/unittype.html @@ -426,10 +426,6 @@ upgrade of sorts. FIXME: This is <b>NOT COMPLETE</b> and only implements the behaviour of wc2 oil platforms. It is followed by the building type it must be built on. </dd> -<dt>volatile</dt> -<dd>This should be true for suicide bombers, a bit of a hack. Available as a -target check for spells, making those invisible would ruin the game. -</dd> <dt>coward</dt> <dd>Unit will not attack on sight, and will run away instead of retaliating. Use this for units that can't attack or are next to useless in combat (like diff --git a/src/include/spells.h b/src/include/spells.h index 7c4e89d35..bc7687389 100644 --- a/src/include/spells.h +++ b/src/include/spells.h @@ -189,7 +189,6 @@ typedef struct ConditionInfo { #define CONDITION_FALSE 1 #define CONDITION_TRUE 0 #define CONDITION_ONLY 2 - char Volatile; /// Target is volatile (suicide bomber). char Coward; /// Target is coward. Don't bloodlust them. char Alliance; /// Target is allied. char Building; /// Target is a building. diff --git a/src/include/unittype.h b/src/include/unittype.h index f9772c9a6..531ef04cc 100644 --- a/src/include/unittype.h +++ b/src/include/unittype.h @@ -408,10 +408,6 @@ ** Only valid for buildings without the BuilderOutside flag. ** The worker is lost when the building is completed. ** -** UnitType::Volatile -** -** Unit is a suicide bomber -** ** UnitType::SelectableByRectangle ** ** Selectable with mouse rectangle @@ -738,7 +734,6 @@ struct _unit_type_ { unsigned CanAttack : 1; /// Unit can attack. unsigned BuilderOutside : 1; /// The builder stays outside during the build. unsigned BuilderLost : 1; /// The builder is lost after the build. - unsigned Volatile : 1; /// Unit is a suicide bomber. unsigned CanHarvest : 1; /// Resource can be harvested. unsigned Harvester : 1; /// unit is a resource harvester. unsigned char *BoolFlag; /// User defined flag. Used for (dis)allow target. diff --git a/src/stratagus/script_spell.cpp b/src/stratagus/script_spell.cpp index 859ea1d59..e67e80607 100644 --- a/src/stratagus/script_spell.cpp +++ b/src/stratagus/script_spell.cpp @@ -366,10 +366,7 @@ local void CclSpellCondition(SCM list, ConditionInfo* condition) while (!gh_null_p(list)) { value = gh_car(list); list = gh_cdr(list); - if (gh_eq_p(value, gh_symbol2scm("volatile"))) { - condition->Volatile = Scm2Condition(gh_car(list)); - list = gh_cdr(list); - } else if (gh_eq_p(value, gh_symbol2scm("coward"))) { + if (gh_eq_p(value, gh_symbol2scm("coward"))) { condition->Coward = Scm2Condition(gh_car(list)); list = gh_cdr(list); } else if (gh_eq_p(value, gh_symbol2scm("alliance"))) { @@ -725,9 +722,6 @@ local void SaveSpellCondition(CLFile *file, ConditionInfo* condition) // First save data related to flags. // NOTE: (int) is there to keep compilers happy. // - if (condition->Volatile != CONDITION_TRUE) { - CLprintf(file, "volatile %s ", condstrings[(int)condition->Volatile]); - } if (condition->Coward != CONDITION_TRUE) { CLprintf(file, "coward %s ", condstrings[(int)condition->Coward]); } diff --git a/src/stratagus/spells.cpp b/src/stratagus/spells.cpp index f9a7e616c..6092ca9e7 100644 --- a/src/stratagus/spells.cpp +++ b/src/stratagus/spells.cpp @@ -776,11 +776,6 @@ local int PassCondition(const Unit* caster, const SpellType* spell, const Unit* // Now check conditions regarding the target unit. // if (target) { - if (condition->Volatile != CONDITION_TRUE) { - if ((condition->Volatile == CONDITION_ONLY) ^ (target->Type->Volatile)) { - return 0; - } - } if (condition->Building != CONDITION_TRUE) { if ((condition->Building == CONDITION_ONLY) ^ (target->Type->Building)) { return 0; diff --git a/src/unit/script_unittype.cpp b/src/unit/script_unittype.cpp index 76a6b9e07..558b42e47 100644 --- a/src/unit/script_unittype.cpp +++ b/src/unit/script_unittype.cpp @@ -516,8 +516,6 @@ local SCM CclDefineUnitType(SCM list) } } else if (gh_eq_p(value, gh_symbol2scm("vanishes"))) { type->Vanishes = 1; - } else if (gh_eq_p(value, gh_symbol2scm("volatile"))) { - type->Volatile = 1; } else if (gh_eq_p(value, gh_symbol2scm("can-cast-spell"))) { // // Warning: can-cast-spell should only be used AFTER all spells diff --git a/src/unit/unittype.cpp b/src/unit/unittype.cpp index 06fa891ea..cdfcd2490 100644 --- a/src/unit/unittype.cpp +++ b/src/unit/unittype.cpp @@ -490,7 +490,7 @@ global void ParsePudUDTA(const char* udta, int length __attribute__((unused))) unittype->CanAttack = BIT(19, v); // unittype->Hero = BIT(23, v); unittype->CanStore[OilCost] = BIT(24, v); - unittype->Volatile = BIT(25, v); +// unittype->Volatile = BIT(25, v); // unittype->Organic = BIT(27, v); if (BIT(11, v) || BIT(21, v)) { @@ -1043,9 +1043,6 @@ local void SaveUnitType(CLFile* file, const UnitType* type, int all) if (type->Vanishes) { CLprintf(file, " 'vanishes\n"); } - if (type->Volatile) { - CLprintf(file, " 'volatile\n"); - } if (type->SelectableByRectangle) { CLprintf(file, " 'selectable-by-rectangle\n"); }