land_battle {axisandallies} | R Documentation |
Run a Land Battle
Description
Simulates one land battle for given attacking and defending units
Usage
land_battle(
offense_infantry = 0,
offense_artillery = 0,
offense_tanks = 0,
offense_fighters = 0,
offense_bombers = 0,
defense_infantry = 0,
defense_artillery = 0,
defense_tanks = 0,
defense_fighters = 0,
defense_bombers = 0,
aagun = FALSE,
bombarding_battleships = 0,
bombarding_cruisers = 0,
write_to_console = TRUE
)
Arguments
offense_infantry |
Number of infantry on the attacking side, which hit when the dice roll is a 1 |
offense_artillery |
Number of artillery on the attacking side, which hit when the dice roll is a 2 or less |
offense_tanks |
Number of tanks on the attacking side, which hit when the dice roll is a 3 or less |
offense_fighters |
Number of fighters on the attacking side, which hit when the dice roll is a 3 or less |
offense_bombers |
Number of bombers on the attacking side, which hit when the dice roll is a 4 or less |
defense_infantry |
Number of infantry on the defending side, which hit when the dice roll is a 2 or less |
defense_artillery |
Number of artillery on the defending side, which hit when the dice roll is a 2 or less |
defense_tanks |
Number of tanks on the defending side, which hit when the dice roll is a 3 or less |
defense_fighters |
Number of infantry on the defending side, which hit when the dice roll is a 4 or less |
defense_bombers |
Number of infantry on the defending side, which hit when the dice roll is a 1 or less |
aagun |
Whether or not an Anti-Air gun is present, which rolls one time at the beginning of the battle for each attacking aircraft, and hits if the roll is a 1 |
bombarding_battleships |
Number of bombarding battleships, which bombard at the start of the battle, and hit at 4 or less |
bombarding_cruisers |
Number of bombarding cruisers, which bombard at the start of the battle, and hit at 3 or less |
write_to_console |
If true, writes the output to the console, if false, returns as a vector |
Value
Offense Loses or Defense Loses and remaining units in lines of text
Examples
land_battle(offense_tanks = 4, offense_fighters = 3, defense_tanks = 9, aagun = TRUE)