Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions unofficial/c511600442.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
--ギャラクシー・ウィザード (Anime)
--Galaxy Wizard (Anime)
local s,id=GetID()
function s.initial_effect(c)
--can be treated as 2 materials that are 4 Levels higher for the Xyz Summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(id)
e1:SetValue(1)
c:RegisterEffect(e1)
--decrease the ATK of an Xyz Monster Summoned with the above effect
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_BE_MATERIAL)
e2:SetCondition(s.atkcon)
e2:SetOperation(s.atkop)
c:RegisterEffect(e2)
end
function s.atkcon(e,tp,eg,ep,ev,re,r,rp)
return r==REASON_XYZ and e:GetHandler():HasFlagEffect(5160442)
end
function s.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=c:GetReasonCard()
Duel.Hint(HINT_CARD,0,id)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(-2000)
e1:SetReset(RESET_EVENT|RESETS_STANDARD)
rc:RegisterEffect(e1,true)
c:ResetFlagEffect(id)
end