C# Class DivineRightGame.CombatHandling.CombatManager

Contains functions pertaining to combat
Afficher le fichier Open project: Haedrian/Divine-Right

Méthodes publiques

Méthode Description
Attack ( Actor attacker, Actor defender, AttackLocation location, SpecialAttack special = null ) : ActionFeedback[]

Performs an attack on a character. Will also give an amount of feedback. Also reduces the health of the defender if the attack hits

CalculateHitPercentage ( Actor attacker, Actor defender, AttackLocation location ) : int

Calculates the chance of hitting a particular body part.

GetRandomAttackLocation ( Actor attacker, Actor defender ) : AttackLocation?

Gets a random attack location to attack. Will prefer attack locations which have more chance of hitting, and will never return any locations which have a 0 chance to hit. If this is not possible, return null

KillCharacter ( Actor actor ) : void

Kills the current character

PerformSpecialAttack ( Actor attacker, Actor target, SpecialAttack attack ) : ActionFeedback[]

Attack a particular target using this special attack

Private Methods

Méthode Description
CombatManager ( ) : System
GetStanceEffect ( int &attack, int &defence, ActorStance stance ) : void

Gets the effect the stance has on attack and defence

LogAction ( Actor attacker, Actor defender, AttackLocation loc, DamageType type, LogMessageStatus status, int diceroll ) : ActionFeedback

Returns a particular logged action.

Method Details

Attack() public static méthode

Performs an attack on a character. Will also give an amount of feedback. Also reduces the health of the defender if the attack hits
public static Attack ( Actor attacker, Actor defender, AttackLocation location, SpecialAttack special = null ) : ActionFeedback[]
attacker DRObjects.Actor
defender DRObjects.Actor
location AttackLocation
special DRObjects.ActorHandling.SpecialAttacks.SpecialAttack Special attack modifications to make. THIS DOES NOT CONSIDER TARGETS OR ATTACKS
Résultat ActionFeedback[]

CalculateHitPercentage() public static méthode

Calculates the chance of hitting a particular body part.
public static CalculateHitPercentage ( Actor attacker, Actor defender, AttackLocation location ) : int
attacker DRObjects.Actor
defender DRObjects.Actor
location AttackLocation
Résultat int

GetRandomAttackLocation() public static méthode

Gets a random attack location to attack. Will prefer attack locations which have more chance of hitting, and will never return any locations which have a 0 chance to hit. If this is not possible, return null
public static GetRandomAttackLocation ( Actor attacker, Actor defender ) : AttackLocation?
attacker DRObjects.Actor
defender DRObjects.Actor
Résultat AttackLocation?

KillCharacter() public static méthode

Kills the current character
public static KillCharacter ( Actor actor ) : void
actor DRObjects.Actor
Résultat void

PerformSpecialAttack() public static méthode

Attack a particular target using this special attack
public static PerformSpecialAttack ( Actor attacker, Actor target, SpecialAttack attack ) : ActionFeedback[]
attacker DRObjects.Actor
target DRObjects.Actor
attack DRObjects.ActorHandling.SpecialAttacks.SpecialAttack
Résultat ActionFeedback[]