| Code: |
| Unknown SystemHook AttackHook |
| Code: |
Pseudocode for the core combat system.
if( attackhook )
call hook
if hook returned 1, exit
endif |
| Code: |
SystemHookScript Attack.ecl
{
AttackHook Attackfunc
} |
| Code: |
exported function Attackfunc( attacker, defender )
if (attacker == defender)
return 1;
endif
var weaponType := cfg[attacker.weapon.objtype];
if (attacker.npctemplate) //special attack styles.. currently in for monsters with anim probs
if (GetObjProperty(attacker, "SpecialAttack"))
DoSpecialMonsterAttack(attacker, defender, weaponType, GetObjProperty(attacker, "SpecialAttack"));
return 1;
endif
endif
if (weaponType.Attribute=="Archery")
ArcheryAttack( attacker, defender );
return 1;
endif
return 0;
endfunction |