Commit 51a9b729 authored by VanillaSalt's avatar VanillaSalt

fix

parent 8c59ab83
......@@ -12,13 +12,6 @@ function c1281505.initial_effect(c)
e1:SetTarget(c1281505.eqtg)
e1:SetOperation(c1281505.eqop)
c:RegisterEffect(e1)
--equip limit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_EQUIP_LIMIT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetValue(c1281505.eqlimit)
c:RegisterEffect(e2)
--destroy sub
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_EQUIP+EFFECT_TYPE_CONTINUOUS)
......@@ -48,10 +41,18 @@ function c1281505.eqop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRelateToEffect(e) then
Duel.Equip(tp,c,tc)
--equip limit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(c1281505.eqlimit)
e1:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e1)
end
end
function c1281505.eqlimit(e,c)
return c:GetControler()==e:GetHandler():GetControler()
return c:GetControler()==e:GetHandlerPlayer() or e:GetHandler():GetEquipTarget()==c
end
function c1281505.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
......
......@@ -45,7 +45,8 @@ function c21702241.damcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsContains(e:GetHandler():GetEquipTarget())
end
function c21702241.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsStatus(STATUS_CHAINING) end
if chk==0 then return e:GetHandler():IsRelateToEffect(e)
and not e:GetHandler():IsStatus(STATUS_CHAINING) end
local ec=e:GetHandler():GetEquipTarget()
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,ec:GetControler(),ec:GetBaseAttack())
end
......
......@@ -3,7 +3,7 @@ function c25132288.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(Card.IsAttribute,ATTRIBUTE_LIGHT),1)
c:EnableReviveLimit()
--send to grave
--addown
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(25132288,0))
e1:SetCategory(CATEGORY_ATKCHANGE)
......@@ -17,13 +17,9 @@ function c25132288.initial_effect(c)
end
function c25132288.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local a=Duel.GetAttacker()
local d=Duel.GetAttackTarget()
if not d or (c~=a and c~=d) then return false end
local tc=a
if tc==c then tc=d end
local tc=c:GetBattleTarget()
e:SetLabelObject(tc)
return tc:IsFaceup() and c:GetAttack()>=500 and c:GetDefence()>=500 and tc:GetAttack()>0 and tc:GetDefence()>0
return tc and c:GetAttack()>=500 and c:GetDefence()>=500 and tc:IsFaceup() and (tc:GetAttack()>0 or tc:GetDefence()>0)
end
function c25132288.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
......
......@@ -36,10 +36,12 @@ end
function c27770341.addcount(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
while tc do
local p=tc:GetReasonPlayer()
local pl=tc:GetPreviousLocation()
if (pl==LOCATION_MZONE and tc:GetPreviousRaceOnField()==RACE_DRAGON)
or (pl==LOCATION_HAND and tc:GetOriginalRace()==RACE_DRAGON) then
if pl==LOCATION_MZONE and tc:GetPreviousRaceOnField()==RACE_DRAGON then
local p=tc:GetReasonPlayer()
c27770341[p]=c27770341[p]+1
elseif pl==LOCATION_HAND and tc:GetOriginalRace()==RACE_DRAGON then
local p=tc:GetPreviousControler()
c27770341[p]=c27770341[p]+1
end
tc=eg:GetNext()
......
......@@ -23,13 +23,6 @@ function c38679204.initial_effect(c)
e2:SetTarget(c38679204.destg)
e2:SetOperation(c38679204.desop)
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(c38679204.eqlimit)
c:RegisterEffect(e3)
end
function c38679204.eqcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_MZONE)
......@@ -50,10 +43,18 @@ function c38679204.eqop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRelateToEffect(e) then
Duel.Equip(tp,c,tc)
--equip limit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(c38679204.eqlimit)
e1:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e1)
end
end
function c38679204.eqlimit(e,c)
return c:GetControler()==e:GetHandler():GetControler()
return c:GetControler()==e:GetHandlerPlayer() or e:GetHandler():GetEquipTarget()==c
end
function c38679204.descon(e,tp,eg,ep,ev,re,r,rp)
local ec=e:GetHandler():GetEquipTarget()
......
......@@ -35,7 +35,7 @@ function c56981417.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then
local te=e:GetLabelObject()
local tg=te:GetTarget()
return tg and tg(e,tp,eg,ep,ev,re,r,rp,0,chkc)
return tg and tg(te,tp,eg,ep,ev,re,r,rp,0,chkc)
end
if chk==0 then return Duel.IsExistingTarget(c56981417.filter,tp,LOCATION_GRAVE,0,1,nil) end
e:SetProperty(EFFECT_FLAG_CARD_TARGET)
......@@ -49,12 +49,24 @@ function c56981417.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local tg=te:GetTarget()
e:SetCategory(te:GetCategory())
e:SetProperty(te:GetProperty())
if tg then tg(e,tp,eg,ep,ev,re,r,rp,1) end
if tg then tg(te,tp,eg,ep,ev,re,r,rp,1) end
local cg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local tc=cg:GetFirst()
while tc do
tc:CreateEffectRelation(te)
tc=cg:GetNext()
end
end
function c56981417.operation(e,tp,eg,ep,ev,re,r,rp)
local te=e:GetLabelObject()
if te and te:GetHandler():IsRelateToEffect(e) then
if te:GetHandler():IsRelateToEffect(e) then
local op=te:GetOperation()
if op then op(e,tp,eg,ep,ev,re,r,rp) end
if op then op(te,tp,eg,ep,ev,re,r,rp) end
local cg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local tc=cg:GetFirst()
while tc do
tc:ReleaseEffectRelation(te)
tc=cg:GetNext()
end
end
end
......@@ -4,18 +4,24 @@ function c72926163.initial_effect(c)
c:EnableReviveLimit()
aux.AddFusionProcCodeFun(c,89943723,aux.FilterBoolFunction(Card.IsRace,RACE_WARRIOR),1,true,true)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(c72926163.splimit)
c:RegisterEffect(e1)
--atk
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetCode(EFFECT_SPSUMMON_CONDITION)
e2:SetValue(c72926163.splimit)
e2:SetCode(EFFECT_MATERIAL_CHECK)
e2:SetValue(c72926163.valcheck)
c:RegisterEffect(e2)
--atk
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetCondition(c72926163.atkcon)
e3:SetOperation(c72926163.atkop)
e3:SetLabelObject(e2)
c:RegisterEffect(e3)
--multiatk
local e4=Effect.CreateEffect(c)
......@@ -24,27 +30,35 @@ function c72926163.initial_effect(c)
e4:SetValue(1)
c:RegisterEffect(e4)
--no battle damage
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_NO_BATTLE_DAMAGE)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_NO_BATTLE_DAMAGE)
c:RegisterEffect(e5)
end
function c72926163.splimit(e,se,sp,st)
return bit.band(st,SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION
end
function c72926163.valcheck(e,c)
local g=c:GetMaterial()
local atk=-1
local tc=g:GetFirst()
if tc:IsCode(89943723) or tc:IsHasEffect(EFFECT_FUSION_SUBSTITUTE) then tc=g:GetNext() end
if not tc:IsCode(89943723) then
atk=tc:GetTextAttack()/2
end
e:SetLabel(atk)
end
function c72926163.atkcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION
end
function c72926163.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=c:GetMaterial()
local tc=g:GetFirst()
if tc:IsCode(89943723) or tc:IsHasEffect(EFFECT_FUSION_SUBSTITUTE) then tc=g:GetNext() end
if not tc:IsCode(89943723) then
local atk=e:GetLabelObject():GetLabel()
if atk>0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(tc:GetAttack()/2)
e1:SetValue(atk)
e1:SetReset(RESET_EVENT+0x1ff0000)
c:RegisterEffect(e1)
end
......
......@@ -45,11 +45,14 @@ function c74064212.eqop(e,tp,eg,ep,ev,re,r,rp)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(1)
e1:SetValue(c74064212.eqlimit)
e1:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e1)
end
end
function c74064212.eqlimit(e,c)
return c:GetControler()==e:GetHandlerPlayer() or e:GetHandler():GetEquipTarget()==c
end
function c74064212.atkcon(e)
local ph=Duel.GetCurrentPhase()
local ec=e:GetHandler():GetEquipTarget()
......
......@@ -23,13 +23,6 @@ function c75886890.initial_effect(c)
e2:SetTarget(c75886890.eqtg2)
e2:SetOperation(c75886890.eqop2)
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(c75886890.eqlimit)
c:RegisterEffect(e3)
end
function c75886890.eqcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......@@ -51,10 +44,18 @@ function c75886890.eqop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRelateToEffect(e) then
Duel.Equip(tp,c,tc)
--equip limit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(c75886890.eqlimit)
e1:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e1)
end
end
function c75886890.eqlimit(e,c)
return c:GetControler()==e:GetHandler():GetControler()
return c:GetControler()==e:GetHandlerPlayer() or e:GetHandler():GetEquipTarget()==c
end
function c75886890.eqcost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() 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