diff --git a/server/data/weidu-baf-iesdp.yml b/server/data/weidu-baf-iesdp.yml index 83bf335..27dda32 100644 --- a/server/data/weidu-baf-iesdp.yml +++ b/server/data/weidu-baf-iesdp.yml @@ -3629,6 +3629,52 @@ actions: Continue() END ``` + + IWDEE supports also the `UseItemAbility` signature: + ``` + IF + !StateCheck(Myself,STATE_MIRRORIMAGE) + GlobalLT("MO_UsedIlbratha","GLOBAL",1) + HasItemEquiped("SW1H26",Myself) // Ilbratha +1 + THEN + RESPONSE #100 + SetInterrupt(FALSE) + UseItemAbility("SW1H26",Myself,SLOT_AMMO3,1) // Ilbratha +1 + SetInterrupt(TRUE) + IncrementGlobal("MO_UsedIlbratha","GLOBAL",1) + END + ``` + - name: UseItemAbility + detail: UseItemAbility(S:Object, O:Target, I:Slot, I:Ability) + doc: |- + This action instructs the active creature to use the specified item (object) on the specified target (target). The ability number (i.e. extended header index) to use may be specified. This action is most often used to allow use of potions and wands. The item to be used must exist in the active creature's inventory (not in a container within the inventory) - though it need not be equipped. + + ``` + IF + HPPercentLT(Myself,50) + HasItem("potn52",Myself) + THEN + RESPONSE #100 + DisplayStringHead(Myself,46150) //quaffs a potion + UseItem("potn52",Myself) + Continue() + END + ``` + + IWDEE supports also the `UseItemAbility` signature: + ``` + IF + !StateCheck(Myself,STATE_MIRRORIMAGE) + GlobalLT("MO_UsedIlbratha","GLOBAL",1) + HasItemEquiped("SW1H26",Myself) // Ilbratha +1 + THEN + RESPONSE #100 + SetInterrupt(FALSE) + UseItemAbility("SW1H26",Myself,SLOT_AMMO3,1) // Ilbratha +1 + SetInterrupt(TRUE) + IncrementGlobal("MO_UsedIlbratha","GLOBAL",1) + END + ``` - name: UseItemSlot detail: UseItemSlot(O:Target, I:Slot) doc: |- @@ -3645,6 +3691,21 @@ actions: Continue() END ``` + + IWDEE supports also the `UseItemAbility` signature: + ``` + IF + !StateCheck(Myself,STATE_MIRRORIMAGE) + GlobalLT("MO_UsedIlbratha","GLOBAL",1) + HasItemEquiped("SW1H26",Myself) // Ilbratha +1 + THEN + RESPONSE #100 + SetInterrupt(FALSE) + UseItemAbility("SW1H26",Myself,SLOT_AMMO3,1) // Ilbratha +1 + SetInterrupt(TRUE) + IncrementGlobal("MO_UsedIlbratha","GLOBAL",1) + END + ``` - name: UseItemSlotAbility detail: UseItemSlotAbility(O:Target, I:Slot, I:Ability) doc: |- @@ -3661,6 +3722,21 @@ actions: Continue() END ``` + + IWDEE supports also the `UseItemAbility` signature: + ``` + IF + !StateCheck(Myself,STATE_MIRRORIMAGE) + GlobalLT("MO_UsedIlbratha","GLOBAL",1) + HasItemEquiped("SW1H26",Myself) // Ilbratha +1 + THEN + RESPONSE #100 + SetInterrupt(FALSE) + UseItemAbility("SW1H26",Myself,SLOT_AMMO3,1) // Ilbratha +1 + SetInterrupt(TRUE) + IncrementGlobal("MO_UsedIlbratha","GLOBAL",1) + END + ``` - name: VEquip detail: VEquip(I:item) doc: |- diff --git a/syntaxes/weidu-baf.tmLanguage.json b/syntaxes/weidu-baf.tmLanguage.json index ce56ecc..6672478 100644 --- a/syntaxes/weidu-baf.tmLanguage.json +++ b/syntaxes/weidu-baf.tmLanguage.json @@ -3168,6 +3168,10 @@ "match": "\\b(UseItem)\\b", "name": "support.function.weidu-baf" }, + { + "match": "\\b(UseItemAbility)\\b", + "name": "support.function.weidu-baf" + }, { "match": "\\b(UseItemPoint)\\b", "name": "support.function.weidu-baf" diff --git a/syntaxes/weidu-baf.tmLanguage.yml b/syntaxes/weidu-baf.tmLanguage.yml index a3b5c65..b3b9c11 100644 --- a/syntaxes/weidu-baf.tmLanguage.yml +++ b/syntaxes/weidu-baf.tmLanguage.yml @@ -858,6 +858,7 @@ repository: - match: \b(UseContainer)\b - match: \b(UseDoor)\b - match: \b(UseItem)\b + - match: \b(UseItemAbility)\b - match: \b(UseItemPoint)\b - match: \b(UseItemPointSlot)\b - match: \b(UseItemSlot)\b