@lands.io/mod-sdk / FakeHumanBoatActionHooks
Interface: FakeHumanBoatActionHooks¶
Hooks for customizing FakeHumanBoatAction behavior.
Table of contents¶
Properties¶
Properties¶
chooseTarget¶
• Optional chooseTarget: (ctx: ActionContext, target: null | BoatTarget) => null | BoatTarget
Hook for chooseTarget - receives context and base target
Type declaration¶
▸ (ctx, target): null | BoatTarget
Parameters¶
| Name | Type |
|---|---|
ctx |
ActionContext |
target |
null | BoatTarget |
Returns¶
null | BoatTarget
chooseTargetPlayer¶
• Optional chooseTargetPlayer: (ctx: ActionContext, targetPlayer: Player, target: null | BoatTarget) => null | BoatTarget
Hook for chooseTargetPlayer - receives context, target player, and base target
Type declaration¶
▸ (ctx, targetPlayer, target): null | BoatTarget
Parameters¶
| Name | Type |
|---|---|
ctx |
ActionContext |
targetPlayer |
Player |
target |
null | BoatTarget |
Returns¶
null | BoatTarget
getTroops¶
• Optional getTroops: (ctx: ActionContext, troops: number) => number
Hook for getTroops - receives context and base troop count
Type declaration¶
▸ (ctx, troops): number
Parameters¶
| Name | Type |
|---|---|
ctx |
ActionContext |
troops |
number |
Returns¶
number
Source Code¶
View full implementation
/**
* Hooks for customizing FakeHumanBoatAction behavior.
*/
export interface FakeHumanBoatActionHooks {
/** Hook for chooseTarget - receives context and base target */
chooseTarget?: (
ctx: ActionContext,
target: BoatTarget | null
) => BoatTarget | null;
/** Hook for chooseTargetPlayer - receives context, target player, and base target */
chooseTargetPlayer?: (
ctx: ActionContext,
targetPlayer: Player,
target: BoatTarget | null
) => BoatTarget | null;
/** Hook for getTroops - receives context and base troop count */
getTroops?: (ctx: ActionContext, troops: number) => number;
}