Game Development Reference
In-Depth Information
increases the rent if another player ends a turn on his property. Figure 8.14 adds
this mechanism to the game. In this diagram, players can buy both properties and
houses, which increases their chance to get a bigger payout when receiving rent.
FIGURe 8.14
Monopoly with an
additional mechanism
to buy houses
To allow the artificial players to use the new gameplay option, we used the follow-
ing script:
if((random * 10 < 1) && (Money > 4 + steps * 0.04)) ire(Buy)
if((Property > Houses / 5) && Money > 6 + steps * 0.04)) ire(Invest)
The first line of the script is just the same as it was: The player has a random 10%
chance of buying a property every time step, if he has enough money saved. The
second line states that if he has more than five times as many properties as houses
(and even more money saved), then he invests in a house.
The best way to see the effect of this balance is to turn the diagram into a deter-
ministic version (removing all random factors), increase the income from passing
Go, and have one artificial player invest in houses and the other not. Without the
option to invest in houses, both players enjoy an identical steady increase of money,
as shown by the purple line in Figure 8.15 . But if one player does invest (blue)
while the other does not (red), the one who invests will win.
FIGURe 8.15
The effects of investing
in houses
 
Search WWH ::




Custom Search