|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface CombatModel
Nested Class Summary | |
---|---|
static class |
CombatModel.CombatOdds
Odds a particular outcome will occur in combat. |
static class |
CombatModel.CombatResult
|
static class |
CombatModel.CombatResultType
|
Method Summary | |
---|---|
void |
attack(Unit attacker,
Unit defender,
CombatModel.CombatResult result,
int plunderGold,
Location repairLocation)
Attack a unit with the given outcome. |
void |
bombard(Colony colony,
Unit defender,
CombatModel.CombatResult result,
Location repairLocation)
Bombard a unit with the given outcome. |
CombatModel.CombatOdds |
calculateCombatOdds(Unit attacker,
Unit defender)
Calculates the chance of the outcomes of combat between the units. |
CombatModel.CombatResult |
generateAttackResult(Colony colony,
Unit defender)
Generates the result of a colony bombarding a Unit. |
CombatModel.CombatResult |
generateAttackResult(Unit attacker,
Unit defender)
Generates a result of an attack. |
float |
getDefencePower(Colony colony,
Unit defender)
Return the defensive power of the defender versus the bombarding colony. |
float |
getDefencePower(Unit attacker,
Unit defender)
Return the defensive power of the defender versus the attacker. |
java.util.Set<Modifier> |
getDefensiveModifiers(Colony colony,
Unit defender)
Return a list of all defensive modifiers that apply to the defender versus the bombarding colony. |
java.util.Set<Modifier> |
getDefensiveModifiers(Unit attacker,
Unit defender)
Return a list of all defensive modifiers that apply to the defender versus the attacker. |
float |
getOffencePower(Colony colony,
Unit defender)
Returns the power for bombarding |
float |
getOffencePower(Unit attacker,
Unit defender)
Return the offensive power of the attacker versus the defender. |
java.util.Set<Modifier> |
getOffensiveModifiers(Colony colony,
Unit defender)
Return a list of all offensive modifiers that apply to the attacker versus the defender. |
java.util.Set<Modifier> |
getOffensiveModifiers(Unit attacker,
Unit defender)
Return a list of all offensive modifiers that apply to the attacker versus the defender. |
Method Detail |
---|
CombatModel.CombatOdds calculateCombatOdds(Unit attacker, Unit defender)
attacker
- The attacking Unit
.defender
- The defending unit.
CombatOdds
value.CombatModel.CombatResult generateAttackResult(Unit attacker, Unit defender)
attacker
- The Unit
attacking.defender
- The defending unit.
CombatResult
valueCombatModel.CombatResult generateAttackResult(Colony colony, Unit defender)
colony
- the bombarding Colony
defender
- the defending Unit
CombatResult
valuefloat getOffencePower(Colony colony, Unit defender)
colony
- a Colony
valuedefender
- an Unit
value
float getOffencePower(Unit attacker, Unit defender)
attacker
- an Unit
valuedefender
- an Unit
value
float
valuefloat getDefencePower(Colony colony, Unit defender)
colony
- a Colony
valuedefender
- a Unit
value
float
valuefloat getDefencePower(Unit attacker, Unit defender)
attacker
- an Unit
valuedefender
- an Unit
value
float
valuejava.util.Set<Modifier> getOffensiveModifiers(Colony colony, Unit defender)
colony
- an Colony
valuedefender
- an Unit
value
List
of Modifiersjava.util.Set<Modifier> getOffensiveModifiers(Unit attacker, Unit defender)
attacker
- an Unit
valuedefender
- an Unit
value
List
of Modifiersjava.util.Set<Modifier> getDefensiveModifiers(Unit attacker, Unit defender)
attacker
- an Unit
valuedefender
- an Unit
value
List
of Modifiersjava.util.Set<Modifier> getDefensiveModifiers(Colony colony, Unit defender)
colony
- a Colony
valuedefender
- an Unit
value
List
of Modifiersvoid attack(Unit attacker, Unit defender, CombatModel.CombatResult result, int plunderGold, Location repairLocation)
attacker
- an Unit
valuedefender
- The Unit
defending against attack.result
- The result of the attack.plunderGold
- an int
valuevoid bombard(Colony colony, Unit defender, CombatModel.CombatResult result, Location repairLocation)
colony
- a Colony
valuedefender
- The Unit
defending against bombardment.result
- The result of the bombardment.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |