Skip to content

Commit 2b6e776

Browse files
committed
"Tilting Entrainment" fix
Fixed a bug in which a "Tilting Entrainment" destroyed by battle would not be able to destroy an opponent's monster with its effect, which should be possible according to rulings.
1 parent 0dab951 commit 2b6e776

1 file changed

Lines changed: 22 additions & 8 deletions

File tree

official/c77855162.lua

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ function s.initial_effect(c)
66
c:EnableReviveLimit()
77
--Synchro Summon procedure: 1 Tuner + 1+ non-Tuner monsters
88
Synchro.AddProcedure(c,nil,1,1,Synchro.NonTuner(nil),1,99)
9-
--Special Summon 1 Level 4 or lower Pendulum Monster from your hand or face-up from your Extra Deck
9+
--If this card is Synchro Summoned: You can Special Summon 1 Level 4 or lower Pendulum Monster from your hand or face-up from your Extra Deck
1010
local e1=Effect.CreateEffect(c)
1111
e1:SetDescription(aux.Stringid(id,0))
1212
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
@@ -18,17 +18,22 @@ function s.initial_effect(c)
1818
e1:SetTarget(s.sptg)
1919
e1:SetOperation(s.spop)
2020
c:RegisterEffect(e1)
21-
--Destroy opponent's monster was not destroyed by the battle
21+
--At the end of the Damage Step, when this card or your Pendulum Monster battles an opponent's monster, but the opponent's monster was not destroyed by the battle: You can destroy that opponent's monster
2222
local e2=Effect.CreateEffect(c)
2323
e2:SetDescription(aux.Stringid(id,1))
2424
e2:SetCategory(CATEGORY_DESTROY)
25-
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
25+
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
2626
e2:SetCode(EVENT_DAMAGE_STEP_END)
27-
e2:SetRange(LOCATION_MZONE)
2827
e2:SetCountLimit(1,{id,1})
28+
e2:SetCondition(s.descon1)
2929
e2:SetTarget(s.destg)
3030
e2:SetOperation(s.desop)
3131
c:RegisterEffect(e2)
32+
local e2b=e2:Clone()
33+
e2b:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
34+
e2b:SetRange(LOCATION_MZONE)
35+
e2b:SetCondition(s.descon2)
36+
c:RegisterEffect(e2b)
3237
end
3338
function s.spfilter(c,e,tp)
3439
if not (c:IsType(TYPE_PENDULUM) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)) then return false end
@@ -49,12 +54,21 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
4954
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
5055
end
5156
end
52-
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk)
57+
function s.descon1(e,tp,eg,ep,ev,re,r,rp)
58+
local a,b=Duel.GetBattleMonster(tp)
59+
e:SetLabelObject(b)
60+
return a and b and b:IsRelateToBattle() and b:IsLocation(LOCATION_MZONE)
61+
and a:IsStatus(STATUS_OPPO_BATTLE)
62+
end
63+
function s.descon2(e,tp,eg,ep,ev,re,r,rp)
5364
local a,b=Duel.GetBattleMonster(tp)
54-
if chk==0 then return a and b and b:IsRelateToBattle() and b:IsLocation(LOCATION_MZONE)
55-
and (a==e:GetHandler() or (a:IsFaceup() and a:IsType(TYPE_PENDULUM))) end
5665
e:SetLabelObject(b)
57-
Duel.SetOperationInfo(0,CATEGORY_DESTROY,b,1,0,0)
66+
return a and b and b:IsRelateToBattle() and b:IsLocation(LOCATION_MZONE)
67+
and a:IsStatus(STATUS_OPPO_BATTLE) and a:IsFaceup() and a:IsType(TYPE_PENDULUM)
68+
end
69+
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk)
70+
if chk==0 then return true end
71+
Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetLabelObject(),1,tp,0)
5872
end
5973
function s.desop(e,tp,eg,ep,ev,re,r,rp)
6074
local tc=e:GetLabelObject()

0 commit comments

Comments
 (0)