Change scoring gangwar system

This commit is contained in:
CroniX
2020-06-22 19:52:41 +02:00
parent 21aee08936
commit 03d88fcb75

View File

@@ -40,8 +40,8 @@ namespace ReallifeGamemode.Server.Gangwar
this.maxValue = maxValue;
this.surplus = surplus;
this.Attacker = null;
this.Att_Score = 50;
this.Def_Score = 50;
this.Att_Score = 0;
this.Def_Score = 0;
this.status = "normal";
this.timer = null;
this.playerInside = new List<Player>();
@@ -154,11 +154,11 @@ namespace ReallifeGamemode.Server.Gangwar
{
gangwarPlayer.TriggerEvent("GangwarScore", this.Attacker, this.Owner, this.Att_Score, this.Def_Score);
}
if (this.Def_Score <= 0)
if (this.Def_Score >= 5)
{
this.takeOver(this.Attacker);
}
else if (this.Att_Score <= 0)
else if (this.Att_Score >= 5)
{
this.takeOver(this.Owner);
}
@@ -172,7 +172,7 @@ namespace ReallifeGamemode.Server.Gangwar
gangwarPlayer.TriggerEvent("GangwarScore", this.Attacker, this.Owner, 0, 0);
}
this.takeOver(this.Owner);
this.Att_Score = 0;
this.Att_Score = 5;
}
else if (this.Def_Score < this.Att_Score)
{
@@ -181,7 +181,7 @@ namespace ReallifeGamemode.Server.Gangwar
gangwarPlayer.TriggerEvent("GangwarScore", this.Attacker, this.Owner, 0, 0);
}
this.takeOver(this.Attacker);
this.Def_Score = 0;
this.Def_Score = 5;
return;
}
else if (this.Def_Score == this.Att_Score)
@@ -191,7 +191,7 @@ namespace ReallifeGamemode.Server.Gangwar
gangwarPlayer.TriggerEvent("GangwarScore", this.Attacker, this.Owner, 0, 0);
}
this.takeOver(this.Attacker);
this.Def_Score = 0;
this.Def_Score = 5;
return;
}
@@ -341,11 +341,11 @@ namespace ReallifeGamemode.Server.Gangwar
{
if (getOwner() == FactionName)
{
Def_Score -= 1;
Def_Score += 1;
}
else if (getAttacker() == FactionName)
{
Att_Score -= 1;
Att_Score += 1;
}
}
}