forked from github/server
"Monster-Fraktion geniesst Welpen-Schutz"
This commit is contained in:
parent
b067c1d511
commit
b1ac90ff63
|
@ -2927,7 +2927,7 @@ steal_cmd(unit * u, struct order * ord, request ** stealorders)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (u2->faction->age < NewbieImmunity()) {
|
if (IsImmune(u2->faction)) {
|
||||||
ADDMSG(&u->faction->msgs,
|
ADDMSG(&u->faction->msgs,
|
||||||
msg_feedback(u, ord, "newbie_immunity_error",
|
msg_feedback(u, ord, "newbie_immunity_error",
|
||||||
"turns", NewbieImmunity()));
|
"turns", NewbieImmunity()));
|
||||||
|
|
|
@ -2603,7 +2603,7 @@ can_start_guarding(const unit * u)
|
||||||
if (u->status>=ST_FLEE) return E_GUARD_FLEEING;
|
if (u->status>=ST_FLEE) return E_GUARD_FLEEING;
|
||||||
if (fval(u->race, RCF_UNARMEDGUARD)) return E_GUARD_OK;
|
if (fval(u->race, RCF_UNARMEDGUARD)) return E_GUARD_OK;
|
||||||
if (!armedmen(u, true)) return E_GUARD_UNARMED;
|
if (!armedmen(u, true)) return E_GUARD_UNARMED;
|
||||||
if (u->faction->age < NewbieImmunity()) return E_GUARD_NEWBIE;
|
if (IsImmune(u->faction)) return E_GUARD_NEWBIE;
|
||||||
return E_GUARD_OK;
|
return E_GUARD_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4028,7 +4028,7 @@ init_battle(region * r, battle **bp)
|
||||||
cmistake(u, ord, 47, MSG_BATTLE);
|
cmistake(u, ord, 47, MSG_BATTLE);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (u2->faction->age < NewbieImmunity()) {
|
if (IsImmune(u2->faction)) {
|
||||||
add_message(&u->faction->msgs,
|
add_message(&u->faction->msgs,
|
||||||
msg_feedback(u, u->thisorder, "newbie_immunity_error", "turns", NewbieImmunity()));
|
msg_feedback(u, u->thisorder, "newbie_immunity_error", "turns", NewbieImmunity()));
|
||||||
continue;
|
continue;
|
||||||
|
|
|
@ -117,6 +117,7 @@ attrib_type at_xontormiaexpress = {
|
||||||
ATF_UNIQUE
|
ATF_UNIQUE
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int
|
int
|
||||||
NewbieImmunity(void) {
|
NewbieImmunity(void) {
|
||||||
static int value = -1;
|
static int value = -1;
|
||||||
|
@ -126,6 +127,12 @@ NewbieImmunity(void) {
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
boolean
|
||||||
|
IsImmune(const faction * f)
|
||||||
|
{
|
||||||
|
return !fval(f, FFL_NPC) && f->age < NewbieImmunity();
|
||||||
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
MaxAge(void) {
|
MaxAge(void) {
|
||||||
static int value = -1;
|
static int value = -1;
|
||||||
|
|
|
@ -405,6 +405,7 @@ extern int NMRTimeout(void);
|
||||||
extern int LongHunger(const struct unit * u);
|
extern int LongHunger(const struct unit * u);
|
||||||
extern int SkillCap(skill_t sk);
|
extern int SkillCap(skill_t sk);
|
||||||
extern int NewbieImmunity(void);
|
extern int NewbieImmunity(void);
|
||||||
|
extern boolean IsImmune(const struct faction * f);
|
||||||
extern int AllianceAuto(void); /* flags that allied factions get automatically */
|
extern int AllianceAuto(void); /* flags that allied factions get automatically */
|
||||||
extern int AllianceRestricted(void); /* flags restricted to allied factions */
|
extern int AllianceRestricted(void); /* flags restricted to allied factions */
|
||||||
extern int HelpMask(void); /* flags restricted to allied factions */
|
extern int HelpMask(void); /* flags restricted to allied factions */
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
Microsoft Visual Studio Solution File, Format Version 9.00
|
Microsoft Visual Studio Solution File, Format Version 9.00
|
||||||
# Visual Studio 2005
|
# Visual Studio 2005
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "util", "common\util.vcproj", "{F70CFB27-8A2F-E447-B452-4E1C590EDA6D}"
|
|
||||||
EndProject
|
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "kernel", "common\kernel.vcproj", "{6F104C0A-DDF5-A34B-A89C-0DC278DCEF6D}"
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "kernel", "common\kernel.vcproj", "{6F104C0A-DDF5-A34B-A89C-0DC278DCEF6D}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gamecode", "common\gamecode.vcproj", "{1E8BFF9E-3044-0742-992F-C5765B80FE65}"
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gamecode", "common\gamecode.vcproj", "{1E8BFF9E-3044-0742-992F-C5765B80FE65}"
|
||||||
|
@ -21,10 +19,6 @@ Global
|
||||||
Release|Win32 = Release|Win32
|
Release|Win32 = Release|Win32
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
{F70CFB27-8A2F-E447-B452-4E1C590EDA6D}.Debug|Win32.ActiveCfg = Debug|Win32
|
|
||||||
{F70CFB27-8A2F-E447-B452-4E1C590EDA6D}.Profile|Win32.ActiveCfg = Profile|Win32
|
|
||||||
{F70CFB27-8A2F-E447-B452-4E1C590EDA6D}.Profile|Win32.Build.0 = Profile|Win32
|
|
||||||
{F70CFB27-8A2F-E447-B452-4E1C590EDA6D}.Release|Win32.ActiveCfg = Release|Win32
|
|
||||||
{6F104C0A-DDF5-A34B-A89C-0DC278DCEF6D}.Debug|Win32.ActiveCfg = Debug|Win32
|
{6F104C0A-DDF5-A34B-A89C-0DC278DCEF6D}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
{6F104C0A-DDF5-A34B-A89C-0DC278DCEF6D}.Profile|Win32.ActiveCfg = Profile|Win32
|
{6F104C0A-DDF5-A34B-A89C-0DC278DCEF6D}.Profile|Win32.ActiveCfg = Profile|Win32
|
||||||
{6F104C0A-DDF5-A34B-A89C-0DC278DCEF6D}.Profile|Win32.Build.0 = Profile|Win32
|
{6F104C0A-DDF5-A34B-A89C-0DC278DCEF6D}.Profile|Win32.Build.0 = Profile|Win32
|
||||||
|
|
Loading…
Reference in New Issue