Introduced the new "Liminal" alignment.
Units specialized on the twilight times of day belong to it.
This commit is contained in:
parent
d01a4ac37a
commit
fcca1b8911
10 changed files with 30 additions and 11 deletions
|
@ -260,6 +260,7 @@ Version 1.9.0-svn:
|
|||
the mouse.
|
||||
* Reducing cache loading for title screen, --test, --editor and --load
|
||||
* Removed Lua dependency, the source is now in the source tree
|
||||
* Introduced a new allignement called "Liminal". Those units fight best during the twilight times of day.
|
||||
|
||||
Version 1.8.0:
|
||||
* AI:
|
||||
|
|
|
@ -274,6 +274,7 @@ 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:
|
||||
|
|
|
@ -78,7 +78,7 @@ Version 1.9.0-svn:
|
|||
* Miscellaneous and bug fixes:
|
||||
* All villages except water and swamp villages can now be placed on any base
|
||||
terrain.
|
||||
|
||||
* Introduced a new allignement called "Liminal". Those units fight best during the twilight times of day.
|
||||
|
||||
Version 1.8.0:
|
||||
* Campaigns:
|
||||
|
|
|
@ -504,14 +504,16 @@ report generate_report(TYPE type,
|
|||
}
|
||||
|
||||
int b = tod.lawful_bonus;
|
||||
int c = tod.liminal_bonus;
|
||||
tooltip << tod.name << '\n'
|
||||
<< _("Lawful units: ") << signed_percent(b) << "\n"
|
||||
<< _("Neutral units: ") << signed_percent(0) << "\n"
|
||||
<< _("Chaotic units: ") << signed_percent(-b);
|
||||
<< _("Chaotic units: ") << signed_percent(-b) << "\n"
|
||||
<< _("Liminal units: ") << signed_percent(c);
|
||||
|
||||
std::string tod_image = tod.image;
|
||||
if (tod.bonus_modified > 0) tod_image += "~BRIGHTEN()";
|
||||
else if (tod.bonus_modified < 0) tod_image += "~DARKEN()";
|
||||
if (tod.lawful_bonus_modified > 0) tod_image += "~BRIGHTEN()";
|
||||
else if (tod.lawful_bonus_modified < 0) tod_image += "~DARKEN()";
|
||||
if (preferences::flip_time()) tod_image += "~FL(horiz)";
|
||||
|
||||
return report("",tod_image,tooltip.str(),"time_of_day");
|
||||
|
|
|
@ -226,12 +226,15 @@ 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(std::find(vals.begin(),vals.end(),std::string("neutral")) == vals.end()) {
|
||||
} 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;
|
||||
}
|
||||
}
|
||||
|
||||
if(!tod_id.empty()) {
|
||||
if(tod_id != tod.id) {
|
||||
if(std::find(tod_id.begin(),tod_id.end(),',') != tod_id.end() &&
|
||||
|
|
|
@ -20,7 +20,10 @@
|
|||
#include "time_of_day.hpp"
|
||||
|
||||
time_of_day::time_of_day(const config& cfg):
|
||||
lawful_bonus(cfg["lawful_bonus"]), bonus_modified(0),
|
||||
lawful_bonus(cfg["lawful_bonus"]),
|
||||
lawful_bonus_modified(0),
|
||||
liminal_bonus(cfg["liminal_bonus"]),
|
||||
liminal_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"]),
|
||||
|
@ -30,7 +33,9 @@ time_of_day::time_of_day(const config& cfg):
|
|||
|
||||
time_of_day::time_of_day()
|
||||
: lawful_bonus(0)
|
||||
, bonus_modified(0)
|
||||
, lawful_bonus_modified(0)
|
||||
, liminal_bonus(0)
|
||||
, liminal_bonus_modified(0)
|
||||
, image()
|
||||
, name("NULL_TOD")
|
||||
, id("nulltod")
|
||||
|
@ -45,6 +50,7 @@ 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;
|
||||
|
|
|
@ -43,7 +43,11 @@ struct time_of_day
|
|||
|
||||
/** The % bonus lawful units receive. Chaotics receive -lawful_bonus. */
|
||||
int lawful_bonus;
|
||||
int bonus_modified;
|
||||
int lawful_bonus_modified;
|
||||
|
||||
/** The % bonus liminal units receive. */
|
||||
int liminal_bonus;
|
||||
int liminal_bonus_modified;
|
||||
|
||||
/** The image to be displayed in the game status. */
|
||||
std::string image;
|
||||
|
|
|
@ -265,7 +265,7 @@ time_of_day tod_manager::time_of_day_at(const map_location& loc) const
|
|||
}
|
||||
}
|
||||
|
||||
tod.bonus_modified = illum_light - tod.lawful_bonus;
|
||||
tod.lawful_bonus_modified = illum_light - tod.lawful_bonus;
|
||||
tod.lawful_bonus = illum_light;
|
||||
|
||||
return tod;
|
||||
|
|
|
@ -732,6 +732,8 @@ void unit_type::build_full(const config& cfg, 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;
|
||||
|
|
|
@ -233,7 +233,7 @@ public:
|
|||
int old_value_;
|
||||
};
|
||||
|
||||
enum ALIGNMENT { LAWFUL, NEUTRAL, CHAOTIC };
|
||||
enum ALIGNMENT { LAWFUL, NEUTRAL, CHAOTIC, LIMINAL };
|
||||
|
||||
ALIGNMENT alignment() const { return alignment_; }
|
||||
static const char* alignment_description(ALIGNMENT align, unit_race::GENDER gender = unit_race::MALE);
|
||||
|
|
Loading…
Add table
Reference in a new issue