Reimplemented the liminal alignment.
This commit is contained in:
parent
192e7a017e
commit
6f14bb59ce
11 changed files with 34 additions and 7 deletions
|
@ -8,6 +8,9 @@ Version 1.9.9+svn:
|
|||
* Updated translations: British English, Dutch, Galician
|
||||
* User interface
|
||||
* Removed waypoints UI feature
|
||||
* WML engine:
|
||||
* Readded the liminal alignment
|
||||
|
||||
|
||||
Version 1.9.9:
|
||||
* AI:
|
||||
|
@ -157,7 +160,7 @@ Version 1.9.9:
|
|||
* [harm_unit] now supports a harmer unit and experience calculation.
|
||||
* Added support for 24 hour ToD.
|
||||
* Added WML validation system based on schema validation.
|
||||
* Enabled validation for GUI WML.
|
||||
* Enabled validation for GUI WML.
|
||||
* Miscellaneous and bug fixes:
|
||||
* Teach wmllint to fix deprecated implicit side=1 in [store_gold], [gold]
|
||||
[remove_shroud], [place_shroud], [modify_side], [modify_ai] actions
|
||||
|
|
|
@ -265,7 +265,8 @@ 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.
|
||||
Neutral units are unaffected by the time of day." + _"
|
||||
Neutral units are unaffected by the time of day.
|
||||
Liminal units get −25% damage during both night and daytime." + _"
|
||||
|
||||
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:
|
||||
" + _"Dawn" + " <jump>to=160</jump><img>src=misc/schedule-dawn.png align=here</img>
|
||||
|
|
|
@ -14,6 +14,10 @@ Night: −25% Damage"
|
|||
|
||||
Day: −25% Damage
|
||||
Night: +25% Damage"
|
||||
liminal_description= _ "Liminal units only reach their full strength during twilight.
|
||||
|
||||
Day: −25% Damage
|
||||
Night: −25% Damage"
|
||||
|
||||
#naming of terrain features
|
||||
bridge_name= _ "$name|’s Bridge,$name|’s Crossing"
|
||||
|
|
|
@ -12,6 +12,8 @@ Version 1.9.9+svn:
|
|||
* Updated translations: British English, Dutch, Galician.
|
||||
* User interface
|
||||
* Removed waypoints UI feature ('w' key) since the whiteboard provides similar functionality
|
||||
* Miscellaneous and bug fixes:
|
||||
* Reintroduced the "Liminal" alignment. Those units fight best during twilight times of day.
|
||||
|
||||
|
||||
Version 1.9.9:
|
||||
|
|
|
@ -2183,6 +2183,9 @@ int combat_modifier(const map_location &loc,
|
|||
case unit_type::CHAOTIC:
|
||||
bonus = -lawful_bonus;
|
||||
break;
|
||||
case unit_type::LIMINAL:
|
||||
bonus = -(abs(lawful_bonus));
|
||||
break;
|
||||
default:
|
||||
bonus = 0;
|
||||
}
|
||||
|
|
|
@ -1017,6 +1017,8 @@ double readonly_context_impl::power_projection(const map_location& loc, const mo
|
|||
tod_modifier = lawful_bonus;
|
||||
} else if(un.alignment() == unit_type::CHAOTIC) {
|
||||
tod_modifier = -lawful_bonus;
|
||||
} else if(un.alignment() == unit_type::LIMINAL) {
|
||||
tod_modifier = -(abs(lawful_bonus));
|
||||
}
|
||||
|
||||
// The 0.5 power avoids underestimating too much the damage of a wounded unit.
|
||||
|
|
|
@ -461,6 +461,8 @@ double aspect_attacks::power_projection(const map_location& loc, const move_map&
|
|||
tod_modifier = lawful_bonus;
|
||||
} else if(un.alignment() == unit_type::CHAOTIC) {
|
||||
tod_modifier = -lawful_bonus;
|
||||
} else if(un.alignment() == unit_type::LIMINAL) {
|
||||
tod_modifier = -(abs(lawful_bonus));
|
||||
}
|
||||
|
||||
// The 0.5 power avoids underestimating too much the damage of a wounded unit.
|
||||
|
@ -563,6 +565,8 @@ double aspect_attacks::power_projection2(const map_location& loc, const move_map
|
|||
tod_modifier = lawful_bonus;
|
||||
} else if(un.alignment() == unit_type::CHAOTIC) {
|
||||
tod_modifier = -lawful_bonus;
|
||||
} else if(un.alignment() == unit_type::LIMINAL) {
|
||||
tod_modifier = -(abs(lawful_bonus));
|
||||
}
|
||||
|
||||
// The 0.5 power avoids underestimating too much the damage of a wounded unit.
|
||||
|
|
|
@ -598,7 +598,8 @@ REPORT_GENERATOR(time_of_day)
|
|||
tooltip << tod.name << '\n'
|
||||
<< _("Lawful units: ") << utils::signed_percent(b) << '\n'
|
||||
<< _("Neutral units: ") << utils::signed_percent(0) << '\n'
|
||||
<< _("Chaotic units: ") << utils::signed_percent(-b) << '\n';
|
||||
<< _("Chaotic units: ") << utils::signed_percent(-b) << '\n'
|
||||
<< _("Liminal units: ") << utils::signed_percent(-(abs(b)));
|
||||
|
||||
std::string tod_image = tod.image;
|
||||
if (tod.bonus_modified > 0) tod_image += "~BRIGHTEN()";
|
||||
|
|
|
@ -456,6 +456,8 @@ 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;
|
||||
}
|
||||
|
@ -1638,6 +1640,9 @@ 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";
|
||||
}
|
||||
|
|
|
@ -693,6 +693,8 @@ 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;
|
||||
|
@ -965,8 +967,8 @@ int unit_type::experience_needed(bool with_acceleration) const
|
|||
|
||||
const char* unit_type::alignment_description(unit_type::ALIGNMENT align, unit_race::GENDER gender)
|
||||
{
|
||||
static const char* aligns[] = { N_("lawful"), N_("neutral"), N_("chaotic") };
|
||||
static const char* aligns_female[] = { N_("female^lawful"), N_("female^neutral"), N_("female^chaotic") };
|
||||
static const char* aligns[] = { N_("lawful"), N_("neutral"), N_("chaotic"), N_("liminal") };
|
||||
static const char* aligns_female[] = { N_("female^lawful"), N_("female^neutral"), N_("female^chaotic"), N_("female^liminal") };
|
||||
const char** tlist = (gender == unit_race::MALE ? aligns : aligns_female);
|
||||
|
||||
return (sgettext(tlist[align]));
|
||||
|
@ -974,7 +976,7 @@ const char* unit_type::alignment_description(unit_type::ALIGNMENT align, unit_ra
|
|||
|
||||
const char* unit_type::alignment_id(unit_type::ALIGNMENT align)
|
||||
{
|
||||
static const char* aligns[] = { "lawful", "neutral", "chaotic" };
|
||||
static const char* aligns[] = { "lawful", "neutral", "chaotic", "liminal" };
|
||||
return (aligns[align]);
|
||||
}
|
||||
|
||||
|
|
|
@ -248,7 +248,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