Commit 1958477f authored by argon.sun's avatar argon.sun

fix

parent 7530da63
--マドルチェ・シューバリエ --マドルチェ・シューバリエ
function c76363626.initial_effect(c) function c75363626.initial_effect(c)
--to deck --to deck
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(76363626,0)) e1:SetDescription(aux.Stringid(75363626,0))
e1:SetCategory(CATEGORY_TODECK) e1:SetCategory(CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_TO_GRAVE) e1:SetCode(EVENT_TO_GRAVE)
e1:SetCondition(c76363626.retcon) e1:SetCondition(c75363626.retcon)
e1:SetTarget(c76363626.rettg) e1:SetTarget(c75363626.rettg)
e1:SetOperation(c76363626.retop) e1:SetOperation(c75363626.retop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--cannot be battle target --cannot be battle target
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
...@@ -16,22 +16,22 @@ function c76363626.initial_effect(c) ...@@ -16,22 +16,22 @@ function c76363626.initial_effect(c)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_MZONE,0) e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET) e2:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET)
e2:SetTarget(c76363626.atktg) e2:SetTarget(c75363626.atktg)
e2:SetValue(1) e2:SetValue(1)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c76363626.retcon(e,tp,eg,ep,ev,re,r,rp) function c75363626.retcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_DESTROY) and e:GetHandler():GetReasonPlayer()~=tp return e:GetHandler():IsReason(REASON_DESTROY) and e:GetHandler():GetReasonPlayer()~=tp
end end
function c76363626.rettg(e,tp,eg,ep,ev,re,r,rp,chk) function c75363626.rettg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOKEN,e:GetHandler(),1,0,0)
end end
function c76363626.retop(e,tp,eg,ep,ev,re,r,rp) function c75363626.retop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then if e:GetHandler():IsRelateToEffect(e) then
Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_EFFECT) Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_EFFECT)
end end
end end
function c76363626.atktg(e,c) function c75363626.atktg(e,c)
return c:GetCode()~=76363626 return c:GetCode()~=75363626
end end
--アサルト・アーマー
function c88190790.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCondition(c88190790.condition)
e1:SetTarget(c88190790.target)
e1:SetOperation(c88190790.operation)
c:RegisterEffect(e1)
--Atk up
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(300)
c:RegisterEffect(e2)
--Equip limit
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_EQUIP_LIMIT)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetValue(1)
c:RegisterEffect(e3)
--multi attack
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(88190790,0))
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_SZONE)
e4:SetCondition(c88190790.macon)
e4:SetCost(c88190790.macost)
e4:SetOperation(c88190790.maop)
c:RegisterEffect(e4)
end
function c88190790.condition(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,0)
local tc=g:GetFirst()
e:SetLabelObject(tc)
return g:GetCount()==1 and tc:IsFaceup() and tc:IsRace(RACE_WARRIOR)
end
function c88190790.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetLabelObject() end
Duel.SetTargetCard(e:GetLabelObject())
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function c88190790.operation(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)
local tc=Duel.GetFirstTarget()
if ct==1 and e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,e:GetHandler(),tc)
end
end
function c88190790.macon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1
end
function c88190790.macost(e,tp,eg,ep,ev,re,r,rp,chkc)
local c=e:GetHandler()
if chkc==0 then return c:IsAbleToGraveAsCost() end
Duel.SetTargetCard(c:GetEquipTarget())
Duel.SendtoGrave(c,REASON_COST)
end
function c88190790.maop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EXTRA_ATTACK)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END)
e1:SetValue(1)
tc:RegisterEffect(e1)
end
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment