Skip to content
This repository was archived by the owner on Dec 4, 2020. It is now read-only.

Commit ed7068e

Browse files
committed
Merge branch 'release' into feature/trust
2 parents c42ba6d + 71059de commit ed7068e

23 files changed

+333
-28
lines changed

cmake/StandardProjectSettings.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ if(ENABLE_IPO)
2929
if(result)
3030
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE)
3131
else()
32-
message(SEND_ERROR "IPO is not supported: ${output}")
32+
message(WARNING "IPO is not supported: ${output}")
3333
endif()
3434
endif()
3535

scripts/globals/abilities/maintenance.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ function onUseAbility(player, target, ability)
4545
if pet:delStatusEffect(tpz.effect.SILENCE) then return true end
4646
if pet:delStatusEffect(tpz.effect.BANE) then return true end
4747
if pet:delStatusEffect(tpz.effect.CURSE_II) then return true end
48-
if pet:delStatusEffect(tpz.effect.CURSE) then return true end
48+
if pet:delStatusEffect(tpz.effect.CURSE_I) then return true end
4949
if pet:delStatusEffect(tpz.effect.PARALYSIS) then return true end
5050
if pet:delStatusEffect(tpz.effect.PLAGUE) then return true end
5151
if pet:delStatusEffect(tpz.effect.POISON) then return true end

scripts/globals/abilities/pets/attachments/eraser.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ local removable = {
99
tpz.effect.SILENCE,
1010
tpz.effect.BANE,
1111
tpz.effect.CURSE_II,
12-
tpz.effect.CURSE,
12+
tpz.effect.CURSE_I,
1313
tpz.effect.PARALYSIS,
1414
tpz.effect.PLAGUE,
1515
tpz.effect.POISON,

scripts/globals/abilities/pets/eraser.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ function onPetAbility(target, automaton, skill, master, action)
2121
if target:delStatusEffect(tpz.effect.SILENCE) then return true end
2222
if target:delStatusEffect(tpz.effect.BANE) then return true end
2323
if target:delStatusEffect(tpz.effect.CURSE_II) then return true end
24-
if target:delStatusEffect(tpz.effect.CURSE) then return true end
24+
if target:delStatusEffect(tpz.effect.CURSE_I) then return true end
2525
if target:delStatusEffect(tpz.effect.PARALYSIS) then return true end
2626
if target:delStatusEffect(tpz.effect.PLAGUE) then return true end
2727
if target:delStatusEffect(tpz.effect.POISON) then return true end

scripts/globals/abilities/repair.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ function onUseAbility(player, target, ability)
6969
if pet:delStatusEffect(tpz.effect.SILENCE) then return true end
7070
if pet:delStatusEffect(tpz.effect.BANE) then return true end
7171
if pet:delStatusEffect(tpz.effect.CURSE_II) then return true end
72-
if pet:delStatusEffect(tpz.effect.CURSE) then return true end
72+
if pet:delStatusEffect(tpz.effect.CURSE_I) then return true end
7373
if pet:delStatusEffect(tpz.effect.PARALYSIS) then return true end
7474
if pet:delStatusEffect(tpz.effect.PLAGUE) then return true end
7575
if pet:delStatusEffect(tpz.effect.POISON) then return true end
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
-----------------------------------------
2+
-- ID: 5433
3+
-- Item: Dusty Elixir
4+
-- Item Effect: Instantly restores 25% of HP and MP
5+
-----------------------------------------
6+
require("scripts/globals/msg")
7+
8+
function onItemCheck(target)
9+
local result = 0
10+
local mHP = target:getMaxHP()
11+
local cHP = target:getHP()
12+
local mMP = target:getMaxMP()
13+
local cMP = target:getMP()
14+
15+
if mHP == cHP and mMP == cMP then
16+
result = 56 -- Does not let player use item if their hp and mp are full
17+
end
18+
19+
return result
20+
end
21+
22+
function onItemUse(target)
23+
target:addHP(target:getMaxHP() * .25)
24+
target:addMP(target:getMaxMP() * .25)
25+
target:messageBasic(tpz.msg.basic.RECOVERS_HP_AND_MP)
26+
end

scripts/globals/items/nexus_cape.lua

Lines changed: 102 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
-----------------------------------------
66
require("scripts/globals/teleports")
77
require("scripts/globals/status")
8+
require('scripts/globals/zone')
89
-----------------------------------------
910

1011
function onItemCheck(target)
@@ -16,15 +17,112 @@ function onItemCheck(target)
1617
-- Don't try to teleport to self!
1718
if (target:getID() ~= leader:getID()) then
1819
local leaderZone = leader:getZoneID()
20+
21+
-- Locations with "**" in comment:
22+
-- ** If the party leader is located in a battlefield or other special location,
23+
-- players will be forced to travel to a specific location.
24+
--
25+
-- Other commented locations:
26+
-- Players will travel of a specific location, not that of the party leader.
1927
local validZoneList =
2028
{
21-
5, 7, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114,
22-
115, 116, 117, 118, 119, 120, 123, 124, 125, 126, 127, 128, 230, 231, 232, 234,
23-
235, 236, 238, 239, 240, 241, 243, 244, 245, 246, 247, 248, 249, 250, 252, 257
29+
tpz.zone.ULEGUERAND_RANGE,
30+
tpz.zone.ATTOHWA_CHASM,
31+
tpz.zone.WEST_RONFAURE,
32+
tpz.zone.EAST_RONFAURE,
33+
tpz.zone.LA_THEINE_PLATEAU,
34+
tpz.zone.VALKURM_DUNES,
35+
tpz.zone.JUGNER_FOREST,
36+
tpz.zone.BATALLIA_DOWNS,
37+
tpz.zone.NORTH_GUSTABERG,
38+
tpz.zone.SOUTH_GUSTABERG,
39+
tpz.zone.KONSCHTAT_HIGHLANDS,
40+
tpz.zone.PASHHOW_MARSHLANDS,
41+
tpz.zone.ROLANBERRY_FIELDS,
42+
tpz.zone.BEAUCEDINE_GLACIER,
43+
tpz.zone.XARCABARD,
44+
tpz.zone.CAPE_TERIGGAN,
45+
tpz.zone.EASTERN_ALTEPA_DESERT,
46+
tpz.zone.WEST_SARUTABARUTA,
47+
tpz.zone.EAST_SARUTABARUTA,
48+
tpz.zone.TAHRONGI_CANYON,
49+
tpz.zone.BUBURIMU_PENINSULA,
50+
tpz.zone.MERIPHATAUD_MOUNTAINS,
51+
tpz.zone.SAUROMUGUE_CHAMPAIGN,
52+
tpz.zone.YUHTUNGA_JUNGLE,
53+
tpz.zone.YHOATOR_JUNGLE,
54+
tpz.zone.WESTERN_ALTEPA_DESERT,
55+
tpz.zone.QUFIM_ISLAND,
56+
tpz.zone.BEHEMOTHS_DOMINION,
57+
tpz.zone.VALLEY_OF_SORROWS,
58+
tpz.zone.SOUTHERN_SAN_DORIA,
59+
tpz.zone.NORTHERN_SAN_DORIA,
60+
tpz.zone.PORT_SAN_DORIA,
61+
tpz.zone.BASTOK_MINES,
62+
tpz.zone.BASTOK_MARKETS,
63+
tpz.zone.PORT_BASTOK,
64+
tpz.zone.WINDURST_WATERS,
65+
tpz.zone.WINDURST_WALLS,
66+
tpz.zone.PORT_WINDURST,
67+
tpz.zone.WINDURST_WOODS,
68+
tpz.zone.RULUDE_GARDENS,
69+
tpz.zone.UPPER_JEUNO,
70+
tpz.zone.LOWER_JEUNO,
71+
tpz.zone.PORT_JEUNO,
72+
tpz.zone.RABAO,
73+
tpz.zone.SELBINA,
74+
tpz.zone.MHAURA,
75+
tpz.zone.KAZHAM,
76+
tpz.zone.NORG,
77+
tpz.zone.CARPENTERS_LANDING,
78+
tpz.zone.BIBIKI_BAY,
79+
tpz.zone.LUFAISE_MEADOWS,
80+
tpz.zone.MISAREAUX_COAST,
81+
-- tpz.zone.TAVNAZIAN_SAFEHOLD,
82+
tpz.zone.ALTAIEU,
83+
-- tpz.zone.AL_ZAHBI,
84+
-- tpz.zone.AHT_URHGAN_WHITEGATE,
85+
-- ** tpz.zone.WAJAOM_WOODLANDS,
86+
tpz.zone.BHAFLAU_THICKETS,
87+
-- tpz.zone.NASHMAU,
88+
-- ** tpz.zone.MOUNT_ZHAYOLM,
89+
-- ** tpz.zone.CAEDARVA_MIRE,
90+
-- tpz.zone.SOUTHERN_SAN_DORIA_S,
91+
tpz.zone.EAST_RONFAURE_S,
92+
tpz.zone.JUGNER_FOREST_S,
93+
tpz.zone.VUNKERL_INLET_S,
94+
tpz.zone.BATALLIA_DOWNS_S,
95+
-- tpz.zone.BASTOK_MARKETS_S,
96+
tpz.zone.NORTH_GUSTABERG_S,
97+
tpz.zone.GRAUBERG_S,
98+
tpz.zone.PASHHOW_MARSHLANDS_S,
99+
tpz.zone.ROLANBERRY_FIELDS_S,
100+
-- tpz.zone.WINDURST_WATERS_S,
101+
tpz.zone.WEST_SARUTABARUTA_S,
102+
tpz.zone.FORT_KARUGO_NARUGO_S,
103+
tpz.zone.MERIPHATAUD_MOUNTAINS_S,
104+
tpz.zone.SAUROMUGUE_CHAMPAIGN_S,
105+
tpz.zone.THE_SANCTUARY_OF_ZITAH,
106+
tpz.zone.ROMAEVE,
107+
tpz.zone.RUAUN_GARDENS,
108+
tpz.zone.BEAUCEDINE_GLACIER_S,
109+
tpz.zone.XARCABARD_S,
110+
-- tpz.zone.METALWORKS,
111+
-- tpz.zone.HEAVENS_TOWER,
112+
-- tpz.zone.WESTERN_ADOULIN,
113+
-- tpz.zone.EASTERN_ADOULIN,
114+
-- tpz.zone.YAHSE_HUNTING_GROUNDS,
115+
-- tpz.zone.CEIZAK_BATTLEGROUNDS,
116+
-- tpz.zone.FORET_DE_HENNETIEL,
117+
-- tpz.zone.YORCIA_WEALD,
118+
-- tpz.zone.MORIMAR_BASALT_FIELDS,
119+
-- tpz.zone.MARJAMI_RAVINE,
120+
-- tpz.zone.KAMIHR_DRIFTS,
121+
-- tpz.zone.LEAFALLIA,
24122
}
25123
-- Make sure we can actually tele to that zone..
26124
for _, validZone in ipairs(validZoneList) do
27-
if validZone == leaderZone then
125+
if validZone == leaderZone and target:isZoneVisited(validZone) then
28126
result = 0
29127
end
30128
end
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
-----------------------------------------
2+
-- ID: 5837
3+
-- Item: tube_of_clear_salve_i
4+
-- Item Effect: Instantly removes 1-2 negative status effects at random from pet
5+
-----------------------------------------
6+
require("scripts/globals/settings")
7+
require("scripts/globals/msg")
8+
9+
function onItemCheck(target)
10+
if not target:hasPet() then
11+
return tpz.msg.basic.REQUIRES_A_PET
12+
end
13+
return 0
14+
end
15+
16+
function onItemUse(target)
17+
local pet = target:getPet()
18+
local effects =
19+
{
20+
tpz.effect.PETRIFICATION,
21+
tpz.effect.SILENCE,
22+
tpz.effect.BANE,
23+
tpz.effect.CURSE_II,
24+
tpz.effect.CURSE_I,
25+
tpz.effect.PARALYSIS,
26+
tpz.effect.PLAGUE,
27+
tpz.effect.POISON,
28+
tpz.effect.DISEASE,
29+
tpz.effect.BLINDNESS
30+
}
31+
32+
local count = math.random(1, 2)
33+
local statusEffectTable = utils.shuffle(effects)
34+
35+
local function removeStatus()
36+
for _, effect in ipairs(statusEffectTable) do
37+
if pet:delStatusEffect(effect) then return true end
38+
end
39+
if pet:eraseStatusEffect() ~= 255 then return true end
40+
return false
41+
end
42+
43+
local removed = 0
44+
45+
for i = 0, count do
46+
if not removeStatus() then break end
47+
removed = removed + 1
48+
if removed >= count then break end
49+
end
50+
51+
return removed
52+
end
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
-----------------------------------------
2+
-- ID: 5838
3+
-- Item: tube_of_clear_salve_ii
4+
-- Item Effect: Instantly removes all negative status effects from pet
5+
-----------------------------------------
6+
require("scripts/globals/settings")
7+
require("scripts/globals/msg")
8+
9+
function onItemCheck(target)
10+
if not target:hasPet() then
11+
return tpz.msg.basic.REQUIRES_A_PET
12+
end
13+
return 0
14+
end
15+
16+
function onItemUse(target)
17+
local pet = target:getPet()
18+
19+
local effects =
20+
{
21+
tpz.effect.PETRIFICATION,
22+
tpz.effect.SILENCE,
23+
tpz.effect.BANE,
24+
tpz.effect.CURSE_II,
25+
tpz.effect.CURSE_I,
26+
tpz.effect.PARALYSIS,
27+
tpz.effect.PLAGUE,
28+
tpz.effect.POISON,
29+
tpz.effect.DISEASE,
30+
tpz.effect.BLINDNESS
31+
}
32+
33+
local count = 10
34+
local statusEffectTable = effects
35+
36+
local function removeStatus()
37+
for _, effect in ipairs(statusEffectTable) do
38+
if pet:delStatusEffect(effect) then return true end
39+
end
40+
if pet:eraseStatusEffect() ~= 255 then return true end
41+
return false
42+
end
43+
44+
local removed = 0
45+
46+
for i = 0, count do
47+
if not removeStatus() then break end
48+
removed = removed + 1
49+
if removed >= count then break end
50+
end
51+
52+
return removed
53+
end
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
-----------------------------------------
2+
-- ID: 5835
3+
-- Item: tube_of_healing_salve_i
4+
-- Item Effect: Instantly restores 50% of pet HP
5+
-----------------------------------------
6+
require("scripts/globals/settings")
7+
require("scripts/globals/msg")
8+
9+
function onItemCheck(target)
10+
if not target:hasPet() then
11+
return tpz.msg.basic.REQUIRES_A_PET
12+
end
13+
return 0
14+
end
15+
16+
function onItemUse(target)
17+
local pet = target:getPet()
18+
local totalHP = pet:getMaxHP() / 2
19+
pet:addHP(totalHP)
20+
pet:messageBasic(tpz.msg.basic.RECOVERS_HP, 0, totalHP)
21+
end

0 commit comments

Comments
 (0)