Commit c6db5f8b authored by Fluorohydride's avatar Fluorohydride

Merge pull request #434 from VanillaSalt/patch58

fix
parents 3b606497 caf94e17
......@@ -50,6 +50,6 @@ end
function c19667590.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_DEFENCE)
end
end
......@@ -22,7 +22,7 @@ function c23232295.initial_effect(c)
c:RegisterEffect(e2)
end
function c23232295.repfilter(c,tp)
return c:IsOnField() and c:IsFaceup() and c:IsControler(tp) and c:IsSetCard(0x84)
return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:IsSetCard(0x84)
end
function c23232295.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:IsExists(c23232295.repfilter,1,nil,tp) end
......
......@@ -46,14 +46,13 @@ function c25341652.posop(e,tp,eg,ep,ev,re,r,rp)
end
end
function c25341652.repfilter(c,tp)
return c:IsOnField() and c:IsFaceup() and c:IsControler(tp) and c:IsSetCard(0x6d) and c:CheckRemoveOverlayCard(tp,1,REASON_EFFECT)
return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:IsSetCard(0x6d) and c:CheckRemoveOverlayCard(tp,1,REASON_EFFECT)
end
function c25341652.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:IsExists(c25341652.repfilter,1,nil,tp) end
if Duel.SelectYesNo(tp,aux.Stringid(25341652,1)) then
local g=eg:Filter(c25341652.repfilter,nil,tp)
g:KeepAlive()
e:SetLabelObject(g)
Duel.SetTargetCard(g)
return true
else return false end
end
......@@ -61,7 +60,7 @@ function c25341652.repval(e,c)
return c25341652.repfilter(c,e:GetHandlerPlayer())
end
function c25341652.repop(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local tc=g:GetFirst()
while tc do
tc:RemoveOverlayCard(tp,1,1,REASON_EFFECT)
......
......@@ -25,7 +25,8 @@ function c31766317.rfilter(c)
end
function c31766317.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local dc=eg:GetFirst()
if chk==0 then return eg:GetCount()==1 and dc~=e:GetHandler() and dc:IsFaceup() and dc:IsRace(RACE_FIEND) and dc:IsAttribute(ATTRIBUTE_DARK)
if chk==0 then return eg:GetCount()==1 and dc~=e:GetHandler() and dc:IsFaceup() and dc:IsLocation(LOCATION_MZONE)
and dc:IsRace(RACE_FIEND) and dc:IsAttribute(ATTRIBUTE_DARK)
and Duel.IsExistingMatchingCard(c31766317.rfilter,tp,LOCATION_GRAVE,0,1,nil) end
if Duel.SelectYesNo(tp,aux.Stringid(31766317,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
......
......@@ -58,6 +58,7 @@ function c4694209.addc2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
tc:AddCounter(0x21,1)
if tc:GetFlagEffect(4694209)~=0 then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EFFECT_DESTROY_REPLACE)
......@@ -65,6 +66,7 @@ function c4694209.addc2(e,tp,eg,ep,ev,re,r,rp)
e1:SetOperation(c4694209.repop)
e1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1)
tc:RegisterFlagEffect(4694209,RESET_EVENT+0x1fe0000,0,0)
end
end
function c4694209.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -27,8 +27,7 @@ function c60080151.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local dam=tc:GetAttack()
Duel.Damage(tp,dam,REASON_EFFECT)
if Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)>0 then
if Duel.Damage(tp,dam,REASON_EFFECT)>0 and Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)>0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(60080151,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
......
......@@ -16,16 +16,17 @@ function c62878208.eqcon(e,tp,eg,ep,ev,re,r,rp)
end
function c62878208.filter1(c,e,tp)
local ec=c:GetEquipTarget()
return ec and ec:IsPosition(POS_FACEUP_ATTACK) and Duel.IsExistingTarget(c62878208.filter2,tp,0,LOCATION_MZONE,1,nil,c)
return ec and ec:IsControler(tp) and ec:IsPosition(POS_FACEUP_ATTACK)
and Duel.IsExistingTarget(c62878208.filter2,tp,0,LOCATION_MZONE,1,nil,c)
end
function c62878208.filter2(c,ec)
return c:IsPosition(POS_FACEUP_ATTACK) and ec:CheckEquipTarget(c)
end
function c62878208.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(c62878208.filter1,tp,LOCATION_SZONE,0,1,nil,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c62878208.filter1,tp,LOCATION_SZONE,LOCATION_SZONE,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(62878208,2))
local g1=Duel.SelectTarget(tp,c62878208.filter1,tp,LOCATION_SZONE,0,1,1,nil,e,tp)
local g1=Duel.SelectTarget(tp,c62878208.filter1,tp,LOCATION_SZONE,LOCATION_SZONE,1,1,nil,e,tp)
e:SetLabelObject(g1:GetFirst())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUPATTACK)
local g2=Duel.SelectTarget(tp,c62878208.filter2,tp,0,LOCATION_MZONE,1,1,nil,g1:GetFirst())
......
......@@ -13,18 +13,17 @@ function c88513608.initial_effect(c)
c:RegisterEffect(e1)
end
function c88513608.check(tp)
local at1=-1
local at2=-2
local at1=0
local ct=0
for i=0,4 do
local tc=Duel.GetFieldCard(tp,LOCATION_MZONE,i)
if tc and tc:IsFaceup() then
local atk=tc:GetAttack()
if at1<0 or atk<=at1 then at2=at1 at1=atk end
if tc and tc:IsPosition(POS_FACEUP_ATTACK) then
at1=at1+tc:GetAttack()
ct=ct+1
end
end
if at1<0 or at2<0 then return false end
at1=at1+at2
at2=-1
if ct<2 then return false end
local at2=-1
for i=0,4 do
local tc=Duel.GetFieldCard(1-tp,LOCATION_MZONE,i)
if tc and tc:IsFaceup() then
......
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