--- a/QTfrontend/ammoSchemeModel.cpp Thu Mar 17 23:53:33 2011 +0100
+++ b/QTfrontend/ammoSchemeModel.cpp Thu Mar 17 23:53:51 2011 +0100
@@ -47,20 +47,21 @@
<< QVariant(false) // per hog ammo 21
<< QVariant(false) // no wind 22
<< QVariant(false) // more wind 23
- << QVariant(100) // damage modfier 24
- << QVariant(45) // turn time 25
- << QVariant(100) // init health 26
- << QVariant(15) // sudden death 27
- << QVariant(5) // case prob 28
- << QVariant(3) // mines time 29
- << QVariant(4) // mines number 30
- << QVariant(0) // mine dud pct 31
- << QVariant(2) // explosives 32
- << QVariant(35) // health case pct 33
- << QVariant(25) // health case amt 34
- << QVariant(47) // water rise amt 35
- << QVariant(5) // health dec amt 36
- << QVariant(100) // rope modfier 37
+ << QVariant(false) // tag team 24
+ << QVariant(100) // damage modfier 25
+ << QVariant(45) // turn time 26
+ << QVariant(100) // init health 27
+ << QVariant(15) // sudden death 28
+ << QVariant(5) // case prob 29
+ << QVariant(3) // mines time 30
+ << QVariant(4) // mines number 31
+ << QVariant(0) // mine dud pct 32
+ << QVariant(2) // explosives 33
+ << QVariant(35) // health case pct 34
+ << QVariant(25) // health case amt 35
+ << QVariant(47) // water rise amt 36
+ << QVariant(5) // health dec amt 37
+ << QVariant(100) // rope modfier 38
;
AmmoSchemeModel::AmmoSchemeModel(QObject* parent, const QString & fileName) :
@@ -108,20 +109,21 @@
<< "perhogammo" // 21
<< "disablewind" // 22
<< "morewind" // 23
- << "damagefactor" // 24
- << "turntime" // 25
- << "health" // 26
- << "suddendeath" // 27
- << "caseprobability" // 28
- << "minestime" // 29
- << "minesnum" // 30
- << "minedudpct" // 31
- << "explosives" // 32
- << "healthprobability" // 33
- << "healthcaseamount" // 34
- << "waterrise" // 35
- << "healthdecrease" // 36
- << "ropepct" // 37
+ << "tagteam" // 24
+ << "damagefactor" // 25
+ << "turntime" // 26
+ << "health" // 27
+ << "suddendeath" // 28
+ << "caseprobability" // 29
+ << "minestime" // 30
+ << "minesnum" // 31
+ << "minedudpct" // 32
+ << "explosives" // 33
+ << "healthprobability" // 34
+ << "healthcaseamount" // 35
+ << "waterrise" // 36
+ << "healthdecrease" // 37
+ << "ropepct" // 38
;
QList<QVariant> proMode;
@@ -150,20 +152,21 @@
<< QVariant(false) // per hog ammo 21
<< QVariant(false) // no wind 22
<< QVariant(false) // more wind 23
- << QVariant(100) // damage modfier 24
- << QVariant(15) // turn time 25
- << QVariant(100) // init health 26
- << QVariant(15) // sudden death 27
- << QVariant(0) // case prob 28
- << QVariant(3) // mines time 29
- << QVariant(0) // mines number 30
- << QVariant(0) // mine dud pct 31
- << QVariant(2) // explosives 32
- << QVariant(35) // health case pct 33
- << QVariant(25) // health case amt 34
- << QVariant(47) // water rise amt 35
- << QVariant(5) // health dec amt 36
- << QVariant(100) // rope modfier 37
+ << QVariant(false) // tag team 24
+ << QVariant(100) // damage modfier 25
+ << QVariant(15) // turn time 26
+ << QVariant(100) // init health 27
+ << QVariant(15) // sudden death 28
+ << QVariant(0) // case prob 29
+ << QVariant(3) // mines time 30
+ << QVariant(0) // mines number 31
+ << QVariant(0) // mine dud pct 32
+ << QVariant(2) // explosives 33
+ << QVariant(35) // health case pct 34
+ << QVariant(25) // health case amt 35
+ << QVariant(47) // water rise amt 36
+ << QVariant(5) // health dec amt 37
+ << QVariant(100) // rope modfier 38
;
QList<QVariant> shoppa;
@@ -192,20 +195,21 @@
<< QVariant(false) // per hog ammo 21
<< QVariant(false) // no wind 22
<< QVariant(false) // more wind 23
- << QVariant(100) // damage modfier 24
- << QVariant(30) // turn time 25
- << QVariant(100) // init health 26
- << QVariant(50) // sudden death 27
- << QVariant(1) // case prob 28
- << QVariant(3) // mines time 29
- << QVariant(0) // mines number 30
- << QVariant(0) // mine dud pct 31
- << QVariant(0) // explosives 32
- << QVariant(0) // health case pct 33
- << QVariant(25) // health case amt 34
- << QVariant(47) // water rise amt 35
- << QVariant(5) // health dec amt 36
- << QVariant(100) // rope modfier 37
+ << QVariant(false) // tag team 24
+ << QVariant(100) // damage modfier 25
+ << QVariant(30) // turn time 26
+ << QVariant(100) // init health 27
+ << QVariant(50) // sudden death 28
+ << QVariant(1) // case prob 29
+ << QVariant(3) // mines time 30
+ << QVariant(0) // mines number 31
+ << QVariant(0) // mine dud pct 32
+ << QVariant(0) // explosives 33
+ << QVariant(0) // health case pct 34
+ << QVariant(25) // health case amt 35
+ << QVariant(47) // water rise amt 36
+ << QVariant(5) // health dec amt 37
+ << QVariant(100) // rope modfier 38
;
QList<QVariant> cleanslate;
@@ -234,20 +238,21 @@
<< QVariant(false) // per hog ammo 21
<< QVariant(false) // no wind 22
<< QVariant(false) // more wind 23
- << QVariant(100) // damage modfier 24
- << QVariant(45) // turn time 25
- << QVariant(100) // init health 26
- << QVariant(15) // sudden death 27
- << QVariant(5) // case prob 28
- << QVariant(3) // mines time 29
- << QVariant(4) // mines number 30
- << QVariant(0) // mine dud pct 31
- << QVariant(2) // explosives 32
- << QVariant(35) // health case pct 33
- << QVariant(25) // health case amt 34
- << QVariant(47) // water rise amt 35
- << QVariant(5) // health dec amt 36
- << QVariant(100) // rope modfier 37
+ << QVariant(false) // tag team 24
+ << QVariant(100) // damage modfier 25
+ << QVariant(45) // turn time 26
+ << QVariant(100) // init health 27
+ << QVariant(15) // sudden death 28
+ << QVariant(5) // case prob 29
+ << QVariant(3) // mines time 30
+ << QVariant(4) // mines number 31
+ << QVariant(0) // mine dud pct 32
+ << QVariant(2) // explosives 33
+ << QVariant(35) // health case pct 34
+ << QVariant(25) // health case amt 35
+ << QVariant(47) // water rise amt 36
+ << QVariant(5) // health dec amt 37
+ << QVariant(100) // rope modfier 38
;
QList<QVariant> minefield;
@@ -276,20 +281,21 @@
<< QVariant(false) // per hog ammo 21
<< QVariant(false) // no wind 22
<< QVariant(false) // more wind 23
- << QVariant(150) // damage modfier 24
- << QVariant(30) // turn time 25
- << QVariant(50) // init health 26
- << QVariant(15) // sudden death 27
- << QVariant(0) // case prob 28
- << QVariant(0) // mines time 29
- << QVariant(80) // mines number 30
- << QVariant(0) // mine dud pct 31
- << QVariant(0) // explosives 32
- << QVariant(35) // health case pct 33
- << QVariant(25) // health case amt 34
- << QVariant(47) // water rise amt 35
- << QVariant(5) // health dec amt 36
- << QVariant(100) // rope modfier 37
+ << QVariant(false) // tag team 24
+ << QVariant(100) // damage modfier 25
+ << QVariant(30) // turn time 26
+ << QVariant(50) // init health 27
+ << QVariant(15) // sudden death 28
+ << QVariant(0) // case prob 29
+ << QVariant(0) // mines time 30
+ << QVariant(80) // mines number 31
+ << QVariant(0) // mine dud pct 32
+ << QVariant(0) // explosives 33
+ << QVariant(35) // health case pct 34
+ << QVariant(25) // health case amt 35
+ << QVariant(47) // water rise amt 36
+ << QVariant(5) // health dec amt 37
+ << QVariant(100) // rope modfier 38
;
QList<QVariant> barrelmayhem;
@@ -318,20 +324,21 @@
<< QVariant(false) // per hog ammo 21
<< QVariant(false) // no wind 22
<< QVariant(false) // more wind 23
- << QVariant(100) // damage modfier 24
- << QVariant(30) // turn time 25
- << QVariant(100) // init health 26
- << QVariant(15) // sudden death 27
- << QVariant(0) // case prob 28
- << QVariant(0) // mines time 29
- << QVariant(0) // mines number 30
- << QVariant(0) // mine dud pct 31
- << QVariant(80) // explosives 32
- << QVariant(35) // health case pct 33
- << QVariant(25) // health case amt 34
- << QVariant(47) // water rise amt 35
- << QVariant(5) // health dec amt 36
- << QVariant(100) // rope modfier 37
+ << QVariant(false) // tag team 24
+ << QVariant(100) // damage modfier 25
+ << QVariant(30) // turn time 26
+ << QVariant(100) // init health 27
+ << QVariant(15) // sudden death 28
+ << QVariant(0) // case prob 29
+ << QVariant(0) // mines time 30
+ << QVariant(0) // mines number 31
+ << QVariant(0) // mine dud pct 32
+ << QVariant(80) // explosives 33
+ << QVariant(35) // health case pct 34
+ << QVariant(25) // health case amt 35
+ << QVariant(47) // water rise amt 36
+ << QVariant(5) // health dec amt 37
+ << QVariant(100) // rope modfier 38
;
QList<QVariant> tunnelhogs;
@@ -360,20 +367,21 @@
<< QVariant(false) // per hog ammo 21
<< QVariant(false) // no wind 22
<< QVariant(false) // more wind 23
- << QVariant(100) // damage modfier 24
- << QVariant(30) // turn time 25
- << QVariant(100) // init health 26
- << QVariant(15) // sudden death 27
- << QVariant(5) // case prob 28
- << QVariant(3) // mines time 29
- << QVariant(10) // mines number 30
- << QVariant(10) // mine dud pct 31
- << QVariant(10) // explosives 32
- << QVariant(35) // health case pct 33
- << QVariant(25) // health case amt 34
- << QVariant(47) // water rise amt 35
- << QVariant(5) // health dec amt 36
- << QVariant(100) // rope modfier 37
+ << QVariant(false) // tag team 24
+ << QVariant(100) // damage modfier 25
+ << QVariant(30) // turn time 26
+ << QVariant(100) // init health 27
+ << QVariant(15) // sudden death 28
+ << QVariant(5) // case prob 29
+ << QVariant(3) // mines time 30
+ << QVariant(10) // mines number 31
+ << QVariant(10) // mine dud pct 32
+ << QVariant(10) // explosives 33
+ << QVariant(35) // health case pct 34
+ << QVariant(25) // health case amt 35
+ << QVariant(47) // water rise amt 36
+ << QVariant(5) // health dec amt 37
+ << QVariant(100) // rope modfier 38
;
QList<QVariant> forts;
@@ -402,20 +410,21 @@
<< QVariant(false) // per hog ammo 21
<< QVariant(false) // no wind 22
<< QVariant(false) // more wind 23
- << QVariant(100) // damage modfier 24
- << QVariant(45) // turn time 25
- << QVariant(100) // init health 26
- << QVariant(15) // sudden death 27
- << QVariant(5) // case prob 28
- << QVariant(3) // mines time 29
- << QVariant(0) // mines number 30
- << QVariant(0) // mine dud pct 31
- << QVariant(0) // explosives 32
- << QVariant(35) // health case pct 33
- << QVariant(25) // health case amt 34
- << QVariant(47) // water rise amt 35
- << QVariant(5) // health dec amt 36
- << QVariant(100) // rope modfier 37
+ << QVariant(false) // tag team 24
+ << QVariant(100) // damage modfier 25
+ << QVariant(45) // turn time 26
+ << QVariant(100) // init health 27
+ << QVariant(15) // sudden death 28
+ << QVariant(5) // case prob 29
+ << QVariant(3) // mines time 30
+ << QVariant(0) // mines number 31
+ << QVariant(0) // mine dud pct 32
+ << QVariant(0) // explosives 33
+ << QVariant(35) // health case pct 34
+ << QVariant(25) // health case amt 35
+ << QVariant(47) // water rise amt 36
+ << QVariant(5) // health dec amt 37
+ << QVariant(100) // rope modfier 38
;
QList<QVariant> timeless;
@@ -444,20 +453,21 @@
<< QVariant(true) // per hog ammo 21
<< QVariant(false) // no wind 22
<< QVariant(false) // more wind 23
- << QVariant(100) // damage modfier 24
- << QVariant(9999) // turn time 25
- << QVariant(100) // init health 26
- << QVariant(15) // sudden death 27
- << QVariant(5) // case prob 28
- << QVariant(3) // mines time 29
- << QVariant(5) // mines number 30
- << QVariant(10) // mine dud pct 31
- << QVariant(2) // explosives 32
- << QVariant(35) // health case pct 33
- << QVariant(30) // health case amt 34
- << QVariant(0) // water rise amt 35
- << QVariant(0) // health dec amt 36
- << QVariant(100) // rope modfier 37
+ << QVariant(false) // tag team 24
+ << QVariant(100) // damage modfier 25
+ << QVariant(9999) // turn time 26
+ << QVariant(100) // init health 27
+ << QVariant(15) // sudden death 28
+ << QVariant(5) // case prob 29
+ << QVariant(3) // mines time 30
+ << QVariant(5) // mines number 31
+ << QVariant(10) // mine dud pct 32
+ << QVariant(2) // explosives 33
+ << QVariant(35) // health case pct 34
+ << QVariant(30) // health case amt 35
+ << QVariant(0) // water rise amt 36
+ << QVariant(0) // health dec amt 37
+ << QVariant(100) // rope modfier 38
;
QList<QVariant> thinkingportals;
@@ -486,20 +496,21 @@
<< QVariant(false) // per hog ammo 21
<< QVariant(false) // no wind 22
<< QVariant(false) // more wind 23
- << QVariant(100) // damage modfier 24
- << QVariant(45) // turn time 25
- << QVariant(100) // init health 26
- << QVariant(15) // sudden death 27
- << QVariant(2) // case prob 28
- << QVariant(3) // mines time 29
- << QVariant(5) // mines number 30
- << QVariant(0) // mine dud pct 31
- << QVariant(5) // explosives 32
- << QVariant(25) // health case pct 33
- << QVariant(25) // health case amt 34
- << QVariant(47) // water rise amt 35
- << QVariant(5) // health dec amt 36
- << QVariant(100) // rope modfier 37
+ << QVariant(false) // tag team 24
+ << QVariant(100) // damage modfier 25
+ << QVariant(45) // turn time 26
+ << QVariant(100) // init health 27
+ << QVariant(15) // sudden death 28
+ << QVariant(2) // case prob 29
+ << QVariant(3) // mines time 30
+ << QVariant(5) // mines number 31
+ << QVariant(0) // mine dud pct 32
+ << QVariant(5) // explosives 33
+ << QVariant(25) // health case pct 34
+ << QVariant(25) // health case amt 35
+ << QVariant(47) // water rise amt 36
+ << QVariant(5) // health dec amt 37
+ << QVariant(100) // rope modfier 38
;
QList<QVariant> kingmode;
@@ -528,20 +539,21 @@
<< QVariant(false) // per hog ammo 21
<< QVariant(false) // no wind 22
<< QVariant(false) // more wind 23
- << QVariant(100) // damage modfier 24
- << QVariant(45) // turn time 25
- << QVariant(100) // init health 26
- << QVariant(15) // sudden death 27
- << QVariant(5) // case prob 28
- << QVariant(3) // mines time 29
- << QVariant(4) // mines number 30
- << QVariant(0) // mine dud pct 31
- << QVariant(2) // explosives 32
- << QVariant(35) // health case pct 33
- << QVariant(25) // health case amt 34
- << QVariant(47) // water rise amt 35
- << QVariant(5) // health dec amt 36
- << QVariant(100) // rope modfier 37
+ << QVariant(false) // tag team 24
+ << QVariant(100) // damage modfier 25
+ << QVariant(45) // turn time 26
+ << QVariant(100) // init health 27
+ << QVariant(15) // sudden death 28
+ << QVariant(5) // case prob 29
+ << QVariant(3) // mines time 30
+ << QVariant(4) // mines number 31
+ << QVariant(0) // mine dud pct 32
+ << QVariant(2) // explosives 33
+ << QVariant(35) // health case pct 34
+ << QVariant(25) // health case amt 35
+ << QVariant(47) // water rise amt 36
+ << QVariant(5) // health dec amt 37
+ << QVariant(100) // rope modfier 38
;
--- a/QTfrontend/gamecfgwidget.cpp Thu Mar 17 23:53:33 2011 +0100
+++ b/QTfrontend/gamecfgwidget.cpp Thu Mar 17 23:53:51 2011 +0100
@@ -211,13 +211,15 @@
result |= 0x00800000; // no wind
if (schemeData(23).toBool())
result |= 0x01000000; // more wind
+ if (schemeData(24).toBool())
+ result |= 0x02000000; // tag team
return result;
}
quint32 GameCFGWidget::getInitHealth() const
{
- return schemeData(26).toInt();
+ return schemeData(27).toInt();
}
QByteArray GameCFGWidget::getFullConfig() const
@@ -227,19 +229,19 @@
bcfg << QString("eseed " + pMapContainer->getCurrentSeed()).toUtf8();
bcfg << QString("e$gmflags %1").arg(getGameFlags()).toUtf8();
- bcfg << QString("e$damagepct %1").arg(schemeData(24).toInt()).toUtf8();
- bcfg << QString("e$turntime %1").arg(schemeData(25).toInt() * 1000).toUtf8();
- bcfg << QString("e$sd_turns %1").arg(schemeData(27).toInt()).toUtf8();
- bcfg << QString("e$casefreq %1").arg(schemeData(28).toInt()).toUtf8();
- bcfg << QString("e$minestime %1").arg(schemeData(29).toInt() * 1000).toUtf8();
- bcfg << QString("e$minesnum %1").arg(schemeData(30).toInt()).toUtf8();
- bcfg << QString("e$minedudpct %1").arg(schemeData(31).toInt()).toUtf8();
- bcfg << QString("e$explosives %1").arg(schemeData(32).toInt()).toUtf8();
- bcfg << QString("e$healthprob %1").arg(schemeData(33).toInt()).toUtf8();
- bcfg << QString("e$hcaseamount %1").arg(schemeData(34).toInt()).toUtf8();
- bcfg << QString("e$waterrise %1").arg(schemeData(35).toInt()).toUtf8();
- bcfg << QString("e$healthdec %1").arg(schemeData(36).toInt()).toUtf8();
- bcfg << QString("e$ropepct %1").arg(schemeData(37).toInt()).toUtf8();
+ bcfg << QString("e$damagepct %1").arg(schemeData(25).toInt()).toUtf8();
+ bcfg << QString("e$turntime %1").arg(schemeData(26).toInt() * 1000).toUtf8();
+ bcfg << QString("e$sd_turns %1").arg(schemeData(28).toInt()).toUtf8();
+ bcfg << QString("e$casefreq %1").arg(schemeData(29).toInt()).toUtf8();
+ bcfg << QString("e$minestime %1").arg(schemeData(30).toInt() * 1000).toUtf8();
+ bcfg << QString("e$minesnum %1").arg(schemeData(31).toInt()).toUtf8();
+ bcfg << QString("e$minedudpct %1").arg(schemeData(32).toInt()).toUtf8();
+ bcfg << QString("e$explosives %1").arg(schemeData(33).toInt()).toUtf8();
+ bcfg << QString("e$healthprob %1").arg(schemeData(34).toInt()).toUtf8();
+ bcfg << QString("e$hcaseamount %1").arg(schemeData(35).toInt()).toUtf8();
+ bcfg << QString("e$waterrise %1").arg(schemeData(36).toInt()).toUtf8();
+ bcfg << QString("e$healthdec %1").arg(schemeData(37).toInt()).toUtf8();
+ bcfg << QString("e$ropepct %1").arg(schemeData(38).toInt()).toUtf8();
bcfg << QString("e$template_filter %1").arg(pMapContainer->getTemplateFilter()).toUtf8();
bcfg << QString("e$mapgen %1").arg(mapgen).toUtf8();
--- a/QTfrontend/pages.cpp Thu Mar 17 23:53:33 2011 +0100
+++ b/QTfrontend/pages.cpp Thu Mar 17 23:53:51 2011 +0100
@@ -1678,6 +1678,10 @@
TBW_morewind->setToolTip("<b>" + ToggleButtonWidget::tr("More Wind") + "</b>:<br />" + tr("Wind will affect almost everything."));
glGMLayout->addWidget(TBW_morewind,4,2,1,1);
+ TBW_tagteam = new ToggleButtonWidget(gbGameModes, ":/res/btnMoreWind.png");
+ TBW_tagteam->setToolTip("<b>" + ToggleButtonWidget::tr("Tag Team") + "</b>:<br />" + tr("Teams in each clan takes successive turns but have to share turn time."));
+ glGMLayout->addWidget(TBW_tagteam,4,3,1,1);
+
// Right
QLabel * l;
@@ -1933,20 +1937,21 @@
mapper->addMapping(TBW_perhogammo, 21);
mapper->addMapping(TBW_nowind, 22);
mapper->addMapping(TBW_morewind, 23);
- mapper->addMapping(SB_DamageModifier, 24);
- mapper->addMapping(SB_TurnTime, 25);
- mapper->addMapping(SB_InitHealth, 26);
- mapper->addMapping(SB_SuddenDeath, 27);
- mapper->addMapping(SB_CaseProb, 28);
- mapper->addMapping(SB_MinesTime, 29);
- mapper->addMapping(SB_Mines, 30);
- mapper->addMapping(SB_MineDuds, 31);
- mapper->addMapping(SB_Explosives, 32);
- mapper->addMapping(SB_HealthCrates, 33);
- mapper->addMapping(SB_CrateHealth, 34);
- mapper->addMapping(SB_WaterRise, 35);
- mapper->addMapping(SB_HealthDecrease, 36);
- mapper->addMapping(SB_RopeModifier, 37);
+ mapper->addMapping(TBW_tagteam, 24);
+ mapper->addMapping(SB_DamageModifier, 25);
+ mapper->addMapping(SB_TurnTime, 26);
+ mapper->addMapping(SB_InitHealth, 27);
+ mapper->addMapping(SB_SuddenDeath, 28);
+ mapper->addMapping(SB_CaseProb, 29);
+ mapper->addMapping(SB_MinesTime, 30);
+ mapper->addMapping(SB_Mines, 31);
+ mapper->addMapping(SB_MineDuds, 32);
+ mapper->addMapping(SB_Explosives, 33);
+ mapper->addMapping(SB_HealthCrates, 34);
+ mapper->addMapping(SB_CrateHealth, 35);
+ mapper->addMapping(SB_WaterRise, 36);
+ mapper->addMapping(SB_HealthDecrease, 37);
+ mapper->addMapping(SB_RopeModifier, 38);
mapper->toFirst();
}
--- a/QTfrontend/pages.h Thu Mar 17 23:53:33 2011 +0100
+++ b/QTfrontend/pages.h Thu Mar 17 23:53:51 2011 +0100
@@ -519,6 +519,7 @@
ToggleButtonWidget * TBW_perhogammo;
ToggleButtonWidget * TBW_nowind;
ToggleButtonWidget * TBW_morewind;
+ ToggleButtonWidget * TBW_tagteam;
QSpinBox * SB_DamageModifier;
QSpinBox * SB_TurnTime;
--- a/hedgewars/GSHandlers.inc Thu Mar 17 23:53:33 2011 +0100
+++ b/hedgewars/GSHandlers.inc Thu Mar 17 23:53:51 2011 +0100
@@ -3237,7 +3237,11 @@
AfterAttack;
CurAmmoGear := nil;
- if (GameFlags and gfInfAttack) = 0 then TurnTimeLeft := 14 * 125;
+ if (GameFlags and gfInfAttack) = 0 then
+ begin
+ if TagTurnTimeLeft = 0 then TagTurnTimeLeft:= TurnTimeLeft;
+ TurnTimeLeft:= 14 * 125;
+ end;
HHGear^.Message := 0;
ParseCommand('/taunt '#1, true)
@@ -4078,6 +4082,7 @@
CurrentHedgehog^.Gear^.X := Gear^.X;
CurrentHedgehog^.Gear^.Y := int2hwFloat(cWaterLine+cVisibleWater)+_128;
CurrentHedgehog^.Unplaced := false;
+ if TagTurnTimeLeft = 0 then TagTurnTimeLeft:= TurnTimeLeft;
TurnTimeLeft:= 0
end;
ResumeMusic
@@ -4097,6 +4102,7 @@
CurrentHedgehog^.Gear^.X := Gear^.X;
CurrentHedgehog^.Gear^.Y := int2hwFloat(cWaterLine+cVisibleWater)+_128;
CurrentHedgehog^.Unplaced := false;
+ if TagTurnTimeLeft = 0 then TagTurnTimeLeft:= TurnTimeLeft;
TurnTimeLeft:= 0
end;
ResumeMusic
--- a/hedgewars/HHHandlers.inc Thu Mar 17 23:53:33 2011 +0100
+++ b/hedgewars/HHHandlers.inc Thu Mar 17 23:53:51 2011 +0100
@@ -379,7 +379,10 @@
begin
OnUsedAmmo(CurrentHedgehog^);
if ((Ammoz[a].Ammo.Propz and ammoprop_NoRoundEnd) = 0) and ((GameFlags and gfInfAttack) = 0) then
+ begin
+ if TagTurnTimeLeft = 0 then TagTurnTimeLeft:= TurnTimeLeft;
TurnTimeLeft:= Ammoz[a].TimeAfterTurn;
+ end;
if ((Ammoz[a].Ammo.Propz and ammoprop_NoRoundEnd) = 0) then State:= State or gstAttacked;
if (Ammoz[a].Ammo.Propz and ammoprop_NoRoundEnd) <> 0 then ApplyAmmoChanges(CurrentHedgehog^)
end;
@@ -793,6 +796,7 @@
if (TurnTimeLeft = 0) or (HHGear^.Damage > 0) then
begin
+ if TagTurnTimeLeft = 0 then TagTurnTimeLeft:= TurnTimeLeft;
TurnTimeLeft:= 0;
isCursorVisible:= false;
HHGear^.State:= HHGear^.State and not (gstHHDriven or gstAnimation or gstAttacking);
--- a/hedgewars/uConsts.pas Thu Mar 17 23:53:33 2011 +0100
+++ b/hedgewars/uConsts.pas Thu Mar 17 23:53:51 2011 +0100
@@ -185,6 +185,7 @@
gfPerHogAmmo = $00400000;
gfDisableWind = $00800000;
gfMoreWind = $01000000;
+ gfTagTeam = $02000000;
// NOTE: When adding new game flags, ask yourself
// if a "game start notice" would be useful. If so,
// add one in uWorld.pas - look for "AddGoal".
--- a/hedgewars/uGears.pas Thu Mar 17 23:53:33 2011 +0100
+++ b/hedgewars/uGears.pas Thu Mar 17 23:53:51 2011 +0100
@@ -886,6 +886,7 @@
if (AliveCount <= 1) and ((GameFlags and gfOneClanMode) = 0) then
begin
step:= stChDmg;
+ if TagTurnTimeLeft = 0 then TagTurnTimeLeft:= TurnTimeLeft;
TurnTimeLeft:= 0
end
end
@@ -915,6 +916,7 @@
if skipFlag then
begin
+ if TagTurnTimeLeft = 0 then TagTurnTimeLeft:= TurnTimeLeft;
TurnTimeLeft:= 0;
skipFlag:= false;
inc(CurrentHedgehog^.Team^.stats.TurnSkips);
--- a/hedgewars/uScript.pas Thu Mar 17 23:53:33 2011 +0100
+++ b/hedgewars/uScript.pas Thu Mar 17 23:53:51 2011 +0100
@@ -1604,6 +1604,7 @@
ScriptSetInteger('gfPerHogAmmo', gfPerHogAmmo);
ScriptSetInteger('gfDisableWind', gfDisableWind);
ScriptSetInteger('gfMoreWind', gfMoreWind);
+ScriptSetInteger('gfTagTeam', gfTagTeam);
ScriptSetInteger('gmLeft', gmLeft);
ScriptSetInteger('gmRight', gmRight);
--- a/hedgewars/uTeams.pas Thu Mar 17 23:53:33 2011 +0100
+++ b/hedgewars/uTeams.pas Thu Mar 17 23:53:51 2011 +0100
@@ -57,6 +57,7 @@
or ((AliveCount = 1) and ((GameFlags and gfOneClanMode) <> 0)) then exit(false);
CheckForWin:= true;
+if TagTurnTimeLeft = 0 then TagTurnTimeLeft:= TurnTimeLeft;
TurnTimeLeft:= 0;
ReadyTimeLeft:= 0;
if not GameOver then
@@ -141,14 +142,24 @@
c:= CurrentTeam^.Clan^.ClanIndex;
repeat
- inc(c);
- if c = ClansCount then
+ if (GameFlags And gfTagTeam) = 0 then inc(c);
+
+ if (c = ClansCount) and ((GameFlags And gfTagTeam) = 0) then
begin
if not PlacingHogs then inc(TotalRounds);
c:= 0
end;
with ClansArray[c]^ do
+ if (CurrTeam = TagTeamIndex) and ((GameFlags And gfTagTeam) <> 0) then
+ begin
+ TagTeamIndex:= Succ(TagTeamIndex) mod TeamsNumber;
+ CurrTeam:= Succ(CurrTeam) mod TeamsNumber;
+ c:= Succ(c) mod ClansCount;
+ NextClan:= true;
+ end;
+
+ with ClansArray[c]^ do
begin
PrevTeam:= CurrTeam;
repeat
@@ -230,11 +241,21 @@
bShowFinger:= true;
if PlacingHogs then
- begin
- if CurrentHedgehog^.Unplaced then TurnTimeLeft:= 15000
- else TurnTimeLeft:= 0
- end
-else TurnTimeLeft:= cHedgehogTurnTime;
+ begin
+ if CurrentHedgehog^.Unplaced then TurnTimeLeft:= 15000
+ else TurnTimeLeft:= 0
+ end
+else if ((GameFlags And gfTagTeam) <> 0) and not NextClan then
+ begin
+ TurnTimeLeft:= TagTurnTimeLeft;
+ TagTurnTimeLeft:= 0;
+ end
+else
+ begin
+ TurnTimeLeft:= cHedgehogTurnTime;
+ TagTurnTimeLeft:= 0;
+ NextClan:= false;
+ end;
if (TurnTimeLeft > 0) and (CurrentHedgehog^.BotLevel = 0) then
begin
if CurrentTeam^.ExtDriven then
@@ -282,6 +303,7 @@
begin
ClanIndex:= Pred(ClansCount);
Color:= TeamColor;
+ TagTeamIndex:= 0;
Flawless:= true
end
end else
@@ -532,7 +554,8 @@
LocalClan:= -1;
LocalTeam:= -1;
LocalAmmo:= -1;
- GameOver:= false
+ GameOver:= false;
+ NextClan:= true;
end;
procedure freeModule;
@@ -550,7 +573,7 @@
for i:= 0 to Pred(ClansCount) do Dispose(ClansArray[i]);
end;
TeamsCount:= 0;
- ClansCount:= 0
+ ClansCount:= 0;
end;
end.
--- a/hedgewars/uTypes.pas Thu Mar 17 23:53:33 2011 +0100
+++ b/hedgewars/uTypes.pas Thu Mar 17 23:53:51 2011 +0100
@@ -353,6 +353,7 @@
Color: Longword;
Teams: array[0..Pred(cMaxTeams)] of PTeam;
TeamsNumber: Longword;
+ TagTeamIndex: Longword;
CurrTeam: LongWord;
ClanHealth: LongInt;
ClanIndex: LongInt;
--- a/hedgewars/uVariables.pas Thu Mar 17 23:53:33 2011 +0100
+++ b/hedgewars/uVariables.pas Thu Mar 17 23:53:51 2011 +0100
@@ -65,6 +65,7 @@
InputMask : LongWord;
GameFlags : Longword;
TurnTimeLeft : Longword;
+ TagTurnTimeLeft : Longword;
ReadyTimeLeft : Longword;
cSuddenDTurns : LongInt;
cDamagePercent : LongInt;
@@ -2119,6 +2120,7 @@
LocalAmmo: LongInt; // last non-bot, non-extdriven clan's first team's ammo index, updated to next upcoming hog for per-hog-ammo
CurMinAngle, CurMaxAngle: Longword;
GameOver: boolean;
+ NextClan: boolean;
FollowGear: PGear;
WindBarWidth: LongInt;
@@ -2277,6 +2279,7 @@
InputMask := $FFFFFFFF;
GameFlags := 0;
TurnTimeLeft := 0;
+ TagTurnTimeLeft := 0;
cSuddenDTurns := 15;
cDamagePercent := 100;
cRopePercent := 100;