-
-
Notifications
You must be signed in to change notification settings - Fork 648
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: scroll of ascencion and swimming to core (#2334)
- Loading branch information
1 parent
d73f9f1
commit 414ddc1
Showing
6 changed files
with
39 additions
and
75 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
18 changes: 0 additions & 18 deletions
18
data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/scroll_of_ascension.lua
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
local scrollOfAscension = Action() | ||
|
||
function scrollOfAscension.onUse(player, item, fromPosition, target, toPosition, isHotkey) | ||
if player:hasExhaustion("scroll-of-ascension") then | ||
return true | ||
end | ||
|
||
local playerTile = Tile(player:getPosition()) | ||
if playerTile and playerTile:getGround() and table.contains(swimmingTiles, playerTile:getGround():getId()) then | ||
player:say("The scroll could get wet, step out of the water first.", TALKTYPE_MONSTER_SAY) | ||
return true | ||
end | ||
|
||
if math.random(10) > 1 then | ||
player:setMonsterOutfit("Demon", 30 * 10 * 1000) | ||
else | ||
player:setMonsterOutfit("Ferumbras", 30 * 10 * 1000) | ||
end | ||
|
||
player:setExhaustion("scroll-of-ascension", 60 * 60) | ||
player:say("Magical sparks whirl around the scroll as you read it and then your appearance is changing.", TALKTYPE_MONSTER_SAY) | ||
player:getPosition():sendMagicEffect(CONST_ME_MAGIC_RED) | ||
return true | ||
end | ||
|
||
scrollOfAscension:id(22771) | ||
scrollOfAscension:register() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters