Skip to content

Commit 60806fa

Browse files
authored
Update "Explosive Urchin (Anime)"
- Should damage in the next Standby Phase after activation, if it happens to be chained to a Trap Card activated by the opponent during the Standby Phase of the triggering player's turn - General script clean-up/modernization
1 parent 83376ef commit 60806fa

1 file changed

Lines changed: 9 additions & 10 deletions

File tree

unofficial/c511002915.lua

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,30 @@
1-
--爆弾ウニ-ボム・アーチン-
1+
--爆弾ウニ-ボム・アーチン- (Anime)
2+
--Explosive Urchin (Anime)
23
local s,id=GetID()
34
function s.initial_effect(c)
45
--Activate
56
local e1=Effect.CreateEffect(c)
67
e1:SetType(EFFECT_TYPE_ACTIVATE)
78
e1:SetCode(EVENT_CHAINING)
89
e1:SetCondition(s.condition)
10+
e1:SetOperation(function(e) e:GetHandler():RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_STANDBY,0,1,Duel.GetTurnCount()) end)
911
c:RegisterEffect(e1)
10-
--damage
12+
--Inflict 1000 damage to your opponent during your next Standby Phase
1113
local e2=Effect.CreateEffect(c)
1214
e2:SetDescription(aux.Stringid(52140003,0))
1315
e2:SetCategory(CATEGORY_DAMAGE)
14-
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
1516
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
17+
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
18+
e2:SetCode(EVENT_PHASE+PHASE_STANDBY)
1619
e2:SetRange(LOCATION_SZONE)
1720
e2:SetCountLimit(1)
18-
e2:SetCode(EVENT_PHASE+PHASE_STANDBY)
19-
e2:SetCondition(s.damcon)
21+
e2:SetCondition(function(e) return Duel.IsTurnPlayer(e:GetHandlerPlayer()) and e:GetHandler():GetFlagEffectLabel(id)~=Duel.GetTurnCount() end)
2022
e2:SetTarget(s.damtg)
2123
e2:SetOperation(s.damop)
2224
c:RegisterEffect(e2)
2325
end
2426
function s.condition(e,tp,eg,ep,ev,re,r,rp)
25-
return re:IsActiveType(TYPE_TRAP) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and rp~=tp
26-
end
27-
function s.damcon(e,tp,eg,ep,ev,re,r,rp)
28-
return tp==Duel.GetTurnPlayer()
27+
return rp==1-tp and re:GetHandler():IsTrap() and re:IsHasType(EFFECT_TYPE_ACTIVATE)
2928
end
3029
function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
3130
if chk==0 then return true end
@@ -37,4 +36,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp)
3736
if not e:GetHandler():IsRelateToEffect(e) then return end
3837
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
3938
Duel.Damage(p,d,REASON_EFFECT)
40-
end
39+
end

0 commit comments

Comments
 (0)