Skip to content

Commit 439b908

Browse files
authored
Update "Gluttonous Reptolphin Greethys"
- Fixed issue where ATK/DEF changes would persist even after monster was flipped face-down and flipped face-up again. - Minor script polish
1 parent 1cc1511 commit 439b908

1 file changed

Lines changed: 13 additions & 18 deletions

File tree

official/c8576764.lua

Lines changed: 13 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
--Scripted by Naim
44
local s,id=GetID()
55
function s.initial_effect(c)
6-
--Special Summon 1 aqua, fish, or sea serpent monster from GY
6+
--You can target 1 Fish, Sea Serpent, or Aqua monster in your GY with an equal or lower Level than the number of cards in your opponent's hand; Special Summon it, but it cannot activate its effects this turn. You can only use this effect of "Gluttonous Reptolphin Greethys" once per turn.
77
local e1=Effect.CreateEffect(c)
88
e1:SetDescription(aux.Stringid(id,0))
99
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
@@ -14,15 +14,15 @@ function s.initial_effect(c)
1414
e1:SetTarget(s.sptg)
1515
e1:SetOperation(s.spop)
1616
c:RegisterEffect(e1)
17-
--If sent to GY as synchro material, the synchro monster gains ATK/DEF
17+
--If this card is sent to the GY as Synchro Material: You can make the Synchro Monster that used this card as material gain 200 ATK/DEF for each card currently in your opponent's hand.
1818
local e2=Effect.CreateEffect(c)
1919
e2:SetDescription(aux.Stringid(id,1))
2020
e2:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
2121
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
2222
e2:SetProperty(EFFECT_FLAG_DELAY)
2323
e2:SetCode(EVENT_BE_MATERIAL)
24-
e2:SetCondition(s.con)
25-
e2:SetOperation(s.op)
24+
e2:SetCondition(s.atkdefchcon)
25+
e2:SetOperation(s.atkdefchop)
2626
c:RegisterEffect(e2)
2727
end
2828
function s.spfilter(c,e,tp,lv)
@@ -53,22 +53,17 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
5353
end
5454
Duel.SpecialSummonComplete()
5555
end
56-
function s.con(e,tp,eg,ep,ev,re,r,rp)
56+
function s.atkdefchcon(e,tp,eg,ep,ev,re,r,rp)
5757
local c=e:GetHandler()
5858
return c:IsLocation(LOCATION_GRAVE) and r==REASON_SYNCHRO and Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0
5959
end
60-
function s.op(e,tp,eg,ep,ev,re,r,rp)
61-
local ct=Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)
60+
function s.atkdefchop(e,tp,eg,ep,ev,re,r,rp)
61+
local val=Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)*200
6262
local c=e:GetHandler()
6363
local sync=c:GetReasonCard()
64-
--Gains ATK/DEF
65-
local e1=Effect.CreateEffect(c)
66-
e1:SetType(EFFECT_TYPE_SINGLE)
67-
e1:SetCode(EFFECT_UPDATE_ATTACK)
68-
e1:SetValue(200*ct)
69-
e1:SetReset(RESET_EVENT|RESETS_STANDARD)
70-
sync:RegisterEffect(e1)
71-
local e2=e1:Clone()
72-
e2:SetCode(EFFECT_UPDATE_DEFENSE)
73-
sync:RegisterEffect(e2)
74-
end
64+
if sync and sync:IsFaceup() then
65+
--Gains 200 ATK/DEF for each card currently in your opponent's hand
66+
sync:UpdateAttack(val,RESET_EVENT|RESETS_STANDARD,c)
67+
sync:UpdateDefense(val,RESET_EVENT|RESETS_STANDARD,c)
68+
end
69+
end

0 commit comments

Comments
 (0)