Removed the liminal alignment support from the engine.

Changelog and Wiki need attention.
This commit is contained in:
Fabian Müller 2011-05-27 16:44:43 +00:00
parent bb816e6724
commit 721984bc65
10 changed files with 9 additions and 39 deletions

View file

@ -265,7 +265,6 @@ If a strike is determined to hit, it will always do at least 1 point of damage.
text= _"The time of day affects the damage of certain units as follows:
Lawful units get +25% damage in daytime, and 25% damage at night.
Chaotic units get +25% damage at night, and 25% in daytime.
Liminal units get +25% damage during twilight.
Neutral units are unaffected by the time of day." + _"
The current time of day can be observed under the minimap in the status pane. For the usual day/night cycle, morning and afternoon count as day, first and second watch count as night:

View file

@ -2162,7 +2162,6 @@ int combat_modifier(const map_location &loc,
int bonus;
int lawful_bonus = tod.lawful_bonus;
int liminal_bonus = tod.liminal_bonus;
switch(alignment) {
case unit_type::LAWFUL:
@ -2174,9 +2173,6 @@ int combat_modifier(const map_location &loc,
case unit_type::CHAOTIC:
bonus = -lawful_bonus;
break;
case unit_type::LIMINAL:
bonus = liminal_bonus;
break;
default:
bonus = 0;
}

View file

@ -594,17 +594,15 @@ REPORT_GENERATOR(time_of_day)
}
int b = tod.lawful_bonus;
int c = tod.liminal_bonus;
tooltip << tod.name << '\n'
<< _("Lawful units: ") << utils::signed_percent(b) << '\n'
<< _("Neutral units: ") << utils::signed_percent(0) << '\n'
<< _("Chaotic units: ") << utils::signed_percent(-b);
if (tod.liminal_present)
tooltip << '\n' << _("Liminal units: ") << utils::signed_percent(c);
<< _("Chaotic units: ") << utils::signed_percent(-b) << '\n';
std::string tod_image = tod.image;
if (tod.lawful_bonus_modified > 0) tod_image += "~BRIGHTEN()";
else if (tod.lawful_bonus_modified < 0) tod_image += "~DARKEN()";
if (tod.bonus_modified > 0) tod_image += "~BRIGHTEN()";
else if (tod.bonus_modified < 0) tod_image += "~DARKEN()";
if (preferences::flip_time()) tod_image += "~FL(horiz)";
return image_report(tod_image, tooltip.str(), "time_of_day");

View file

@ -227,10 +227,6 @@ bool terrain_filter::match_internal(const map_location& loc, const bool ignore_x
if(std::find(vals.begin(),vals.end(),std::string("lawful")) == vals.end()) {
return false;
}
} else if(tod.liminal_bonus>0) {
if(std::find(vals.begin(),vals.end(),std::string("liminal")) == vals.end()) {
return false;
}
} else if(std::find(vals.begin(),vals.end(),std::string("neutral")) == vals.end()) {
return false;
}

View file

@ -23,10 +23,7 @@
time_of_day::time_of_day(const config& cfg):
lawful_bonus(cfg["lawful_bonus"]),
lawful_bonus_modified(0),
liminal_bonus(cfg["liminal_bonus"]),
liminal_bonus_modified(0),
liminal_present(!(cfg["liminal_bonus"]).empty()),
bonus_modified(0),
image(cfg["image"]), name(cfg["name"].t_str()), id(cfg["id"]),
image_mask(cfg["mask"]),
red(cfg["red"]), green(cfg["green"]), blue(cfg["blue"]),
@ -36,10 +33,7 @@ time_of_day::time_of_day(const config& cfg):
time_of_day::time_of_day()
: lawful_bonus(0)
, lawful_bonus_modified(0)
, liminal_bonus(0)
, liminal_bonus_modified(0)
, liminal_present(false)
, bonus_modified(0)
, image()
, name("NULL_TOD")
, id("nulltod")
@ -54,7 +48,6 @@ time_of_day::time_of_day()
void time_of_day::write(config& cfg) const
{
cfg["lawful_bonus"] = lawful_bonus;
cfg["liminal_bonus"] = liminal_bonus;
cfg["red"] = red;
cfg["green"] = green;
cfg["blue"] = blue;

View file

@ -45,12 +45,7 @@ struct time_of_day
/** The % bonus lawful units receive. Chaotics receive -lawful_bonus. */
int lawful_bonus;
int lawful_bonus_modified;
/** The % bonus liminal units receive. */
int liminal_bonus;
int liminal_bonus_modified;
bool liminal_present;
int bonus_modified;
/** The image to be displayed in the game status. */
std::string image;

View file

@ -266,7 +266,7 @@ time_of_day tod_manager::time_of_day_at(const map_location& loc) const
}
}
tod.lawful_bonus_modified = illum_light - tod.lawful_bonus;
tod.bonus_modified = illum_light - tod.lawful_bonus;
tod.lawful_bonus = illum_light;
return tod;

View file

@ -467,8 +467,6 @@ unit::unit(const config &cfg, bool use_traits, game_state* state) :
alignment_ = unit_type::NEUTRAL;
} else if(align == "chaotic") {
alignment_ = unit_type::CHAOTIC;
} else if(align == "liminal") {
alignment_ = unit_type::LIMINAL;
} else if(align.empty()==false){
alignment_ = unit_type::NEUTRAL;
}
@ -1660,9 +1658,6 @@ void unit::write(config& cfg) const
case unit_type::CHAOTIC:
cfg["alignment"] = "chaotic";
break;
case unit_type::LIMINAL:
cfg["alignment"] = "liminal";
break;
default:
cfg["alignment"] = "neutral";
}

View file

@ -691,8 +691,6 @@ void unit_type::build_full(const movement_type_map &mv_types,
alignment_ = CHAOTIC;
else if(align == "neutral")
alignment_ = NEUTRAL;
else if(align == "liminal")
alignment_ = LIMINAL;
else {
ERR_CF << "Invalid alignment found for " << id() << ": '" << align << "'\n";
alignment_ = NEUTRAL;

View file

@ -248,7 +248,7 @@ public:
int old_value_;
};
enum ALIGNMENT { LAWFUL, NEUTRAL, CHAOTIC, LIMINAL };
enum ALIGNMENT { LAWFUL, NEUTRAL, CHAOTIC };
ALIGNMENT alignment() const { return alignment_; }
static const char* alignment_description(ALIGNMENT align, unit_race::GENDER gender = unit_race::MALE);