C# 클래스 DivineRightGame.CombatHandling.CombatManager

Contains functions pertaining to combat
파일 보기 프로젝트 열기: Haedrian/Divine-Right

공개 메소드들

메소드 설명
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[]