Combat

Methods to interact with the combat gametab:

../../images/combattab.png

TCombat

Main record responsible with handling the combat gametab.


Combat.IsOpen

function TCombat.IsOpen(): Boolean;

Returns true/false if the combat tab is open.

Example:

WriteLn Combat.IsOpen();

Combat.Open

function TCombat.Open(): Boolean;

Attempts to open the combat gametab.

Example:

WriteLn Combat.Open();

Combat.GetCategory

function TCombat.GetCategory(): EWeaponCategory;

Returns the EWeaponCategory of the current weapon.

Example:

{$I WaspLib/main.simba}
begin
  WriteLn Combat.GetCategory();
end.

Combat.StyleBoxes

property TCombat.StyleBoxes: TBoxArray;

Returns the the attack style boxes available.

Example:

{$I WaspLib/main.simba}
begin
  while True do
    ShowOnTarget(Combat.StyleBoxes);
end.
../../images/attackstyles.gif

Combat.WeaponStyle

property TCombat.WeaponStyle: EWeaponStyle;
property TCombat.WeaponStyle(value: EWeaponStyle): Boolean;

Gets/Sets the weapon EWeaponStyle.

Example:

{$I WaspLib/main.simba}
begin
  WriteLn Combat.WeaponStyle;
  WriteLn Combat.WeaponStyle := EWeaponStyle.BLOCK;
  WriteLn Combat.WeaponStyle;
end.

Combat.MeleeStyle

property TCombat.MeleeStyle: EMeleeStyle;
property TCombat.MeleeStyle(value: EMeleeStyle): Boolean;

Gets/Sets the combat EMeleeStyle. Doesn’t do anything if we don’t have a melee weapon.

Example:

{$I WaspLib/main.simba}
begin
  WriteLn Combat.MeleeStyle;
  WriteLn Combat.MeleeStyle := EMeleeStyle.SLASH;
  WriteLn Combat.MeleeStyle;
end.

Combat.AutoRetaliate

property TCombat.AutoRetaliate: Boolean;
property TCombat.AutoRetaliate(value: Boolean): Boolean;

Gets/Sets the auto retaliate state.

Example:

{$I WaspLib/main.simba}
begin
  WriteLn Combat.AutoRetaliate;
  Combat.AutoRetaliate := True;
  WriteLn Combat.AutoRetaliate;
  Combat.AutoRetaliate := False;
  WriteLn Combat.AutoRetaliate;
end.

Combat.SpecialAttack

property TCombat.SpecialAttack: Boolean;
property TCombat.SpecialAttack(value: Boolean): Boolean;

Gets/Sets the special attack state.

Example:

{$I WaspLib/main.simba}
begin
  WriteLn Combat.SpecialAttack;
  Combat.SpecialAttack := True;
  WriteLn Combat.SpecialAttack;
  Combat.SpecialAttack := False;
  WriteLn Combat.SpecialAttack;
end.

Combat variable

Global TCombat variable.