Skip to content
This repository has been archived by the owner on Oct 1, 2022. It is now read-only.

Commit

Permalink
Fixed offer stacks & building scripts for winegrower and backery (#740)
Browse files Browse the repository at this point in the history
* added missing offer stack to the winegrower
* fixed baker being able to make bread with just water, fixed offer stack
* adjustments to pass integration tests again
  • Loading branch information
nptr authored and andreas-eberle committed Jul 20, 2018
1 parent 1b5cccd commit b51b35a
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,18 @@
<blocked dx="2" dy="5" block="false" />
<blocked dx="3" dy="5" block="false" />
<blocked dx="4" dy="5" block="false" />
<blocked dx="-2" dy="2" block="false" />
<blocked dx="-1" dy="3" block="false" />
<blocked dx="0" dy="4" block="false" />
<blocked dx="1" dy="5" block="false" />

<door dx="3" dy="2" />

<constructionStack dx="3" dy="5" material="PLANK" buildrequired="4" />
<constructionStack dx="4" dy="4" material="STONE" buildrequired="5" />
<requestStack dx="3" dy="4" material="FLOUR" />
<requestStack dx="4" dy="2" material="WATER" />
<offerStack dx="-2" dy="1" material="BREAD" />
<offerStack dx="-2" dy="2" material="BREAD" />

<bricklayer dx="-1" dy="2" direction="NORTH_EAST" />
<bricklayer dx="1" dy="4" direction="NORTH_EAST" />
Expand All @@ -87,10 +91,10 @@
<job name="gohome" type="GO_TO" successjob="hide" failjob="hide" dx="3" dy="2"/>
<job name="hide" type="HIDE" successjob="reset1" failjob="reset1"/>
<job name="reset1" type="SET_MATERIAL" successjob="wait" failjob="wait" material="NO_MATERIAL"/>
<job name="wait" type="WAIT" successjob="check1" failjob="A_wait" time="1"/>
<job name="check1" type="AVAILABLE" successjob="check2" failjob="A_wait" dx="3" dy="4" material="FLOUR"/>
<job name="check2" type="AVAILABLE" successjob="check3" failjob="A_wait" dx="4" dy="2" material="WATER"/>
<job name="check3" type="NOT_FULL" successjob="A_show" failjob="A_wait" dx="-2" dy="1"/>
<job name="wait" type="WAIT" successjob="check1" failjob="check1" time="1"/>
<job name="check1" type="AVAILABLE" successjob="check2" failjob="wait" dx="3" dy="4" material="FLOUR"/>
<job name="check2" type="AVAILABLE" successjob="check3" failjob="wait" dx="4" dy="2" material="WATER"/>
<job name="check3" type="NOT_FULL" successjob="A_show" failjob="wait" dx="-2" dy="2"/>

<!-- go take flour -->
<job name="A_show" type="SHOW" successjob="A_walkA1" failjob="gohome" dx="3" dy="2" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
<!-- materials checked with original -->
<constructionStack dx="0" dy="4" material="PLANK" buildrequired="4" />
<constructionStack dx="2" dy="4" material="STONE" buildrequired="4" />
<offerStack dx="3" dy="4" material="WINE" />

<bricklayer dx="2" dy="3" direction="NORTH_WEST" />
<bricklayer dx="3" dy="2" direction="NORTH_WEST" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public class AiDifficultiesIT {

@Test
public void easyShouldConquerVeryEasy() throws MapLoadException {
holdBattleBetween(EPlayerType.AI_EASY, EPlayerType.AI_VERY_EASY, 75 * MINUTES);
holdBattleBetween(EPlayerType.AI_EASY, EPlayerType.AI_VERY_EASY, 80 * MINUTES);
}

@Test
Expand All @@ -78,7 +78,7 @@ public void veryHardShouldProduceCertainAmountOfSoldiersWithin90Minutes() throws

MatchConstants.clock().fastForwardTo(90 * MINUTES);

short expectedMinimalProducedSoldiers = 920;
short expectedMinimalProducedSoldiers = 850;
short producedSoldiers = startingGame.getMainGrid().getPartitionsGrid().getPlayer(0).getEndgameStatistic().getAmountOfProducedSoldiers();
if (producedSoldiers < expectedMinimalProducedSoldiers) {
stopAndFail("AI_VERY_HARD was not able to produce " + expectedMinimalProducedSoldiers + " soldiers within 90 minutes.\nOnly " + producedSoldiers
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit b51b35a

Please sign in to comment.