C# Класс DivineRightGame.CombatHandling.CombatManager

Contains functions pertaining to combat
Показать файл Открыть проект

Открытые методы

Метод Описание
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

Приватные методы

Метод Описание
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.

Описание методов

Attack() публичный статический Метод

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
Результат ActionFeedback[]

CalculateHitPercentage() публичный статический Метод

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
Результат int

GetRandomAttackLocation() публичный статический Метод

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
Результат AttackLocation?

KillCharacter() публичный статический Метод

Kills the current character
public static KillCharacter ( Actor actor ) : void
actor DRObjects.Actor
Результат void

PerformSpecialAttack() публичный статический Метод

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
Результат ActionFeedback[]