Commit 5a0227dc authored by Fluorohydride's avatar Fluorohydride

Merge pull request #538 from VanillaSalt/patch66

fix
parents 9213d982 1c19674d
...@@ -3,6 +3,7 @@ function c12275533.initial_effect(c) ...@@ -3,6 +3,7 @@ function c12275533.initial_effect(c)
--summon --summon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(12275533,0)) e1:SetDescription(aux.Stringid(12275533,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,0x1e0) e1:SetHintTiming(0,0x1e0)
...@@ -39,7 +40,7 @@ function c12275533.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -39,7 +40,7 @@ function c12275533.condition(e,tp,eg,ep,ev,re,r,rp)
end end
function c12275533.target(e,tp,eg,ep,ev,re,r,rp,chk) function c12275533.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,tp,0,false,false) end and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end end
function c12275533.operation(e,tp,eg,ep,ev,re,r,rp) function c12275533.operation(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -9,10 +9,10 @@ function c13391185.initial_effect(c) ...@@ -9,10 +9,10 @@ function c13391185.initial_effect(c)
e1:SetCondition(c13391185.eqcon1) e1:SetCondition(c13391185.eqcon1)
e1:SetValue(TYPE_NORMAL+TYPE_MONSTER) e1:SetValue(TYPE_NORMAL+TYPE_MONSTER)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--spsummon --tohand
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(13391185,0)) e2:SetDescription(aux.Stringid(13391185,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
...@@ -31,7 +31,7 @@ function c13391185.eqcon2(e) ...@@ -31,7 +31,7 @@ function c13391185.eqcon2(e)
return eg and eg:IsExists(Card.IsSetCard,1,nil,0x207a) return eg and eg:IsExists(Card.IsSetCard,1,nil,0x207a)
end end
function c13391185.thcon(e,tp,eg,ep,ev,re,r,rp) function c13391185.thcon(e,tp,eg,ep,ev,re,r,rp)
return c13391185.eqcon2(e) and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==1 return c13391185.eqcon2(e)
end end
function c13391185.thcost(e,tp,eg,ep,ev,re,r,rp,chk) function c13391185.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,13391185)==0 end if chk==0 then return Duel.GetFlagEffect(tp,13391185)==0 end
...@@ -43,12 +43,12 @@ end ...@@ -43,12 +43,12 @@ end
function c13391185.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c13391185.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c13391185.thfilter(chkc) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c13391185.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c13391185.thfilter,tp,LOCATION_GRAVE,0,1,nil) end if chk==0 then return Duel.IsExistingTarget(c13391185.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c13391185.thfilter,tp,LOCATION_GRAVE,0,1,1,nil) local g=Duel.SelectTarget(tp,c13391185.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end end
function c13391185.desfilter(c) function c13391185.desfilter(c)
return c:IsFaceup() and c:IsSetCard(0x207a) and c:IsType(TYPE_EQUIP) return c:IsFaceup() and c:IsSetCard(0x207a) and c:IsType(TYPE_EQUIP) and c:IsDestructable()
end end
function c13391185.thop(e,tp,eg,ep,ev,re,r,rp) function c13391185.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
......
...@@ -63,7 +63,7 @@ function c14553285.descost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -63,7 +63,7 @@ function c14553285.descost(e,tp,eg,ep,ev,re,r,rp,chk)
e:GetHandler():RemoveCounter(tp,0x3001,2,REASON_COST) e:GetHandler():RemoveCounter(tp,0x3001,2,REASON_COST)
end end
function c14553285.destg(e,tp,eg,ep,ev,re,r,rp,chk) function c14553285.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_ONFIELD,nil) local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end end
......
...@@ -16,7 +16,7 @@ end ...@@ -16,7 +16,7 @@ end
function c1539051.target(e,tp,eg,ep,ev,re,r,rp,chk) function c1539051.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
local g=Duel.GetMatchingGroup(c1539051.gfilter,tp,LOCATION_MZONE,0,nil) local g=Duel.GetMatchingGroup(c1539051.gfilter,tp,LOCATION_MZONE,0,nil)
local ct=g:GetClassCount(Card.GetOriginalCode) local ct=g:GetClassCount(Card.GetCode)
e:SetLabel(ct) e:SetLabel(ct)
return ct>0 and Duel.IsPlayerCanDraw(tp,ct) return ct>0 and Duel.IsPlayerCanDraw(tp,ct)
end end
...@@ -27,6 +27,6 @@ end ...@@ -27,6 +27,6 @@ end
function c1539051.activate(e,tp,eg,ep,ev,re,r,rp) function c1539051.activate(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
local g=Duel.GetMatchingGroup(c1539051.gfilter,tp,LOCATION_MZONE,0,nil) local g=Duel.GetMatchingGroup(c1539051.gfilter,tp,LOCATION_MZONE,0,nil)
local ct=g:GetClassCount(Card.GetOriginalCode) local ct=g:GetClassCount(Card.GetCode)
Duel.Draw(p,ct,REASON_EFFECT) Duel.Draw(p,ct,REASON_EFFECT)
end end
...@@ -45,7 +45,7 @@ function c18807108.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -45,7 +45,7 @@ function c18807108.operation(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c18807108.rcon(e) function c18807108.rcon(e)
return e:GetOwner():IsRelateToCard(e:GetHandler()) return not e:GetHandler():IsImmuneToEffect(e) and e:GetOwner():IsRelateToCard(e:GetHandler())
end end
function c18807108.descon(e,tp,eg,ep,ev,re,r,rp) function c18807108.descon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -32,7 +32,7 @@ function c20686759.filter(c) ...@@ -32,7 +32,7 @@ function c20686759.filter(c)
return c:IsFaceup() and c:IsSetCard(0x26) return c:IsFaceup() and c:IsSetCard(0x26)
end end
function c20686759.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c20686759.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:GetLocation()==LOCATION_MZONE and c20686759.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and c20686759.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c20686759.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(c20686759.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c20686759.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) Duel.SelectTarget(tp,c20686759.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
...@@ -46,7 +46,7 @@ function c20686759.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -46,7 +46,7 @@ function c20686759.operation(e,tp,eg,ep,ev,re,r,rp)
end end
function c20686759.damcon(e,tp,eg,ep,ev,re,r,rp) function c20686759.damcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local ec=c:GetEquipTarget() local ec=c:GetPreviousEquipTarget()
return c:IsReason(REASON_LOST_TARGET) and ec and ec:IsReason(REASON_DESTROY) return c:IsReason(REASON_LOST_TARGET) and ec and ec:IsReason(REASON_DESTROY)
end end
function c20686759.damtg(e,tp,eg,ep,ev,re,r,rp,chk) function c20686759.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -40,7 +40,7 @@ function c26285788.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -40,7 +40,7 @@ function c26285788.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
end end
function c26285788.effectcon(e,tp,eg,ep,ev,re,r,rp) function c26285788.effectcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(26285789)>0 return Duel.GetFlagEffect(tp,26285789)>0
end end
function c26285788.filter1(c) function c26285788.filter1(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToHand() and not c:IsHasEffect(EFFECT_NECRO_VALLEY) return c:IsType(TYPE_MONSTER) and c:IsAbleToHand() and not c:IsHasEffect(EFFECT_NECRO_VALLEY)
...@@ -50,7 +50,7 @@ function c26285788.filter2(c) ...@@ -50,7 +50,7 @@ function c26285788.filter2(c)
end end
function c26285788.effectop(e,tp,eg,ep,ev,re,r,rp) function c26285788.effectop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,26285789) Duel.Hint(HINT_CARD,0,26285789)
local ct=Duel.GetFlagEffect(26285789) local ct=Duel.GetFlagEffect(tp,26285789)
if ct==1 then if ct==1 then
Duel.Draw(tp,1,REASON_EFFECT) Duel.Draw(tp,1,REASON_EFFECT)
elseif ct==2 then elseif ct==2 then
......
...@@ -29,7 +29,8 @@ function c27827272.filter2(c,atk) ...@@ -29,7 +29,8 @@ function c27827272.filter2(c,atk)
return c:IsFaceup() and c:IsDefenceBelow(atk) and c:IsDestructable() return c:IsFaceup() and c:IsDefenceBelow(atk) and c:IsDestructable()
end end
function c27827272.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c27827272.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingTarget(c27827272.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,tp) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c27827272.filter(chkc,tp) end
if chk==0 then return Duel.IsExistingTarget(c27827272.filter,tp,LOCATION_MZONE,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c27827272.filter,tp,LOCATION_MZONE,0,1,1,nil,tp) local g=Duel.SelectTarget(tp,c27827272.filter,tp,LOCATION_MZONE,0,1,1,nil,tp)
local dg=Duel.GetMatchingGroup(c27827272.filter2,tp,0,LOCATION_MZONE,nil,g:GetFirst():GetAttack()) local dg=Duel.GetMatchingGroup(c27827272.filter2,tp,0,LOCATION_MZONE,nil,g:GetFirst():GetAttack())
......
...@@ -50,8 +50,8 @@ function c28201945.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -50,8 +50,8 @@ function c28201945.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,c28201945.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp,ft) local g=Duel.SelectMatchingCard(tp,c28201945.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp,ft)
local tc=g:GetFirst() local tc=g:GetFirst()
if tc then if tc then
if ft>0 and tc:IsAbleToHand() and tc:IsCanBeSpecialSummoned(e,0,tp,false,false) if ft>0 and tc:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.SelectYesNo(tp,aux.Stringid(28201945,1)) then and (not tc:IsAbleToHand() or Duel.SelectYesNo(tp,aux.Stringid(28201945,1))) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
else else
Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.SendtoHand(tc,nil,REASON_EFFECT)
......
...@@ -63,10 +63,7 @@ function c28423537.splimit(e,c,tp,sumtp,sumpos) ...@@ -63,10 +63,7 @@ function c28423537.splimit(e,c,tp,sumtp,sumpos)
return not c:IsRace(RACE_FIEND) return not c:IsRace(RACE_FIEND)
end end
function c28423537.tgop(e,tp,eg,ep,ev,re,r,rp) function c28423537.tgop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() Duel.Destroy(e:GetHandler(),REASON_EFFECT)
if c:IsRelateToEffect(e) and c:IsFaceup() then
Duel.Destroy(c,REASON_EFFECT)
end
end end
function c28423537.rfilter(c) function c28423537.rfilter(c)
return c:IsSetCard(0x45) and c:IsAbleToRemoveAsCost() return c:IsSetCard(0x45) and c:IsAbleToRemoveAsCost()
......
...@@ -2,9 +2,8 @@ ...@@ -2,9 +2,8 @@
function c29616929.initial_effect(c) function c29616929.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) e1:SetCategory(CATEGORY_DISABLE+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e1:SetCode(EVENT_CHAINING) e1:SetCode(EVENT_CHAINING)
e1:SetCondition(c29616929.condition) e1:SetCondition(c29616929.condition)
e1:SetTarget(c29616929.target) e1:SetTarget(c29616929.target)
...@@ -30,17 +29,17 @@ function c29616929.checkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -30,17 +29,17 @@ function c29616929.checkop(e,tp,eg,ep,ev,re,r,rp)
end end
function c29616929.condition(e,tp,eg,ep,ev,re,r,rp) function c29616929.condition(e,tp,eg,ep,ev,re,r,rp)
local loc=Duel.GetChainInfo(0,CHAININFO_TRIGGERING_LOCATION) local loc=Duel.GetChainInfo(0,CHAININFO_TRIGGERING_LOCATION)
return ep~=tp and loc==LOCATION_MZONE and re:GetHandler():GetFlagEffect(29616929)>0 and Duel.IsChainNegatable(ev) return ep~=tp and loc==LOCATION_MZONE and re:GetHandler():GetFlagEffect(29616929)>0 and Duel.IsChainDisablable(ev)
end end
function c29616929.target(e,tp,eg,ep,ev,re,r,rp,chk) function c29616929.target(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_NEGATE,eg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end end
end end
function c29616929.activate(e,tp,eg,ep,ev,re,r,rp) function c29616929.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateActivation(ev) Duel.NegateEffect(ev)
if re:GetHandler():IsRelateToEffect(re) then if re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT) Duel.Destroy(eg,REASON_EFFECT)
end end
......
...@@ -48,7 +48,7 @@ function c30230789.filter(c) ...@@ -48,7 +48,7 @@ function c30230789.filter(c)
return c:IsSetCard(0x11) and c:IsAbleToHand() return c:IsSetCard(0x11) and c:IsAbleToHand()
end end
function c30230789.tg(e,tp,eg,ep,ev,re,r,rp,chk) function c30230789.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c30230789.filter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end end
function c30230789.op(e,tp,eg,ep,ev,re,r,rp) function c30230789.op(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -68,8 +68,8 @@ function c31480215.splimit(e,c,tp,sumtp,sumpos) ...@@ -68,8 +68,8 @@ function c31480215.splimit(e,c,tp,sumtp,sumpos)
return not c:IsAttribute(ATTRIBUTE_WIND) return not c:IsAttribute(ATTRIBUTE_WIND)
end end
function c31480215.lvcost(e,tp,eg,ep,ev,re,r,rp,chk) function c31480215.lvcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,31480215)==0 and Duel.CheckReleaseGroup(tp,Card.IsType,1,nil,TYPE_TOKEN) end if chk==0 then return Duel.GetFlagEffect(tp,31480215)==0 and Duel.CheckReleaseGroup(tp,Card.IsSetCard,1,nil,0x101b) end
local g=Duel.SelectReleaseGroup(tp,Card.IsType,1,1,nil,TYPE_TOKEN) local g=Duel.SelectReleaseGroup(tp,Card.IsSetCard,1,1,nil,0x101b)
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
Duel.RegisterFlagEffect(tp,31480215,RESET_PHASE+PHASE_END,0,1) Duel.RegisterFlagEffect(tp,31480215,RESET_PHASE+PHASE_END,0,1)
end end
......
...@@ -15,6 +15,7 @@ function c31764700.initial_effect(c) ...@@ -15,6 +15,7 @@ function c31764700.initial_effect(c)
--damage --damage
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EVENT_BATTLE_END) e3:SetCode(EVENT_BATTLE_END)
e3:SetOperation(c31764700.batop) e3:SetOperation(c31764700.batop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
...@@ -37,14 +38,16 @@ end ...@@ -37,14 +38,16 @@ end
function c31764700.batop(e,tp,eg,ep,ev,re,r,rp) function c31764700.batop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local bc=c:GetBattleTarget() local bc=c:GetBattleTarget()
if bc then if bc and c:IsAttackPos() then
e:SetLabel(bc:GetAttack()) e:SetLabel(bc:GetAttack())
e:SetLabelObject(bc) e:SetLabelObject(bc)
else
e:SetLabelObject(nil)
end end
end end
function c31764700.damtg(e,tp,eg,ep,ev,re,r,rp,chk) function c31764700.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
local bc=e:GetHandler():GetBattleTarget() local bc=e:GetLabelObject():GetLabelObject()
if chk==0 then return bc and e:GetHandler():IsAttackPos() end if chk==0 then return bc end
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,e:GetLabelObject():GetLabel()) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,e:GetLabelObject():GetLabel())
if bc:IsDestructable() then if bc:IsDestructable() then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,bc,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,bc,1,0,0)
...@@ -52,7 +55,7 @@ function c31764700.damtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -52,7 +55,7 @@ function c31764700.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c31764700.damop(e,tp,eg,ep,ev,re,r,rp) function c31764700.damop(e,tp,eg,ep,ev,re,r,rp)
Duel.Damage(1-tp,e:GetLabelObject():GetLabel(),REASON_EFFECT) Duel.Damage(1-tp,e:GetLabelObject():GetLabel(),REASON_EFFECT)
local bc=e:GetHandler():GetBattleTarget() local bc=e:GetLabelObject():GetLabelObject()
if bc:IsRelateToBattle() then if bc:IsRelateToBattle() then
Duel.Destroy(bc,REASON_EFFECT) Duel.Destroy(bc,REASON_EFFECT)
end end
......
...@@ -125,7 +125,7 @@ function c31930787.dircost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -125,7 +125,7 @@ function c31930787.dircost(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c31930787.dirop(e,tp,eg,ep,ev,re,r,rp,chk) function c31930787.dirop(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsFacedown() and not c:IsRelateToEffect(e) then return end if c:IsFacedown() or not c:IsRelateToEffect(e) then return end
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DIRECT_ATTACK) e1:SetCode(EFFECT_DIRECT_ATTACK)
......
...@@ -14,7 +14,7 @@ end ...@@ -14,7 +14,7 @@ end
function c33184236.cfilter(c,tp) function c33184236.cfilter(c,tp)
local np=c:GetPosition() local np=c:GetPosition()
local pp=c:GetPreviousPosition() local pp=c:GetPreviousPosition()
return c:IsControler(tp) and c:IsSetCard(0x11) and ((pp==0x1 and np==0x4) or (pp==0x4 and np==0x1) or (pp==0x8 and np==0x1)) return c:IsControler(tp) and c:IsSetCard(0x11) and ((pp==0x1 and np==0x4) or (pp==0x4 and np==0x1))
end end
function c33184236.condition(e,tp,eg,ep,ev,re,r,rp) function c33184236.condition(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c33184236.cfilter,1,nil,tp) return eg:IsExists(c33184236.cfilter,1,nil,tp)
......
...@@ -17,7 +17,7 @@ function c38167722.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -17,7 +17,7 @@ function c38167722.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
end end
function c38167722.target(e,tp,eg,ep,ev,re,r,rp,chk) function c38167722.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>1 end if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end
Duel.SetTargetPlayer(tp) Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(2) Duel.SetTargetParam(2)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
...@@ -27,16 +27,16 @@ function c38167722.cfilter(c) ...@@ -27,16 +27,16 @@ function c38167722.cfilter(c)
end end
function c38167722.activate(e,tp,eg,ep,ev,re,r,rp) function c38167722.activate(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
local dis=false local g=Duel.GetMatchingGroup(c38167722.cfilter,p,0,LOCATION_HAND,nil)
if Duel.IsChainDisablable(0) then if g:GetCount()>0 and Duel.SelectYesNo(1-p,aux.Stringid(38167722,0)) then
local g=Duel.GetMatchingGroup(c38167722.cfilter,p,0,LOCATION_HAND,nil) Duel.Hint(HINT_SELECTMSG,1-p,HINTMSG_CONFIRM)
if g:GetCount()>0 and Duel.SelectYesNo(1-p,aux.Stringid(38167722,0)) then local sg=g:Select(1-p,1,1,nil)
Duel.Hint(HINT_SELECTMSG,1-p,HINTMSG_CONFIRM) Duel.ConfirmCards(p,sg)
local sg=g:Select(1-p,1,1,nil) Duel.ShuffleHand(1-p)
Duel.ConfirmCards(p,sg) if Duel.IsChainDisablable(0) then
Duel.ShuffleHand(1-p) Duel.NegateEffect(0)
dis=true return
end end
end end
if not dis then Duel.Draw(p,d,REASON_EFFECT) end Duel.Draw(p,d,REASON_EFFECT)
end end
...@@ -5,6 +5,7 @@ function c39019325.initial_effect(c) ...@@ -5,6 +5,7 @@ function c39019325.initial_effect(c)
e1:SetCategory(CATEGORY_DESTROY) e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetHintTiming(0,TIMING_END_PHASE) e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetTarget(c39019325.target) e1:SetTarget(c39019325.target)
e1:SetOperation(c39019325.activate) e1:SetOperation(c39019325.activate)
...@@ -18,11 +19,12 @@ end ...@@ -18,11 +19,12 @@ end
function c39019325.dfilter(c) function c39019325.dfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable()
end end
function c39019325.target(e,tp,eg,ep,ev,re,r,rp,chk) function c39019325.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c39019325.rfilter(chkc,e) end
if chk==0 then return Duel.IsExistingTarget(c39019325.rfilter,tp,LOCATION_MZONE,0,1,nil,e) if chk==0 then return Duel.IsExistingTarget(c39019325.rfilter,tp,LOCATION_MZONE,0,1,nil,e)
and Duel.IsExistingMatchingCard(c39019325.dfilter,tp,0,LOCATION_ONFIELD,1,nil) end and Duel.IsExistingMatchingCard(c39019325.dfilter,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local rg=Duel.SelectTarget(tp,c39019325.rfilter,tp,LOCATION_ONFIELD,0,1,1,nil,e) local rg=Duel.SelectTarget(tp,c39019325.rfilter,tp,LOCATION_MZONE,0,1,1,nil,e)
local g=Duel.GetMatchingGroup(c39019325.dfilter,tp,0,LOCATION_ONFIELD,nil) local g=Duel.GetMatchingGroup(c39019325.dfilter,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end end
......
...@@ -12,15 +12,17 @@ function c43487744.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -12,15 +12,17 @@ function c43487744.condition(e,tp,eg,ep,ev,re,r,rp)
return rp~=tp and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsCode(53129443) return rp~=tp and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsCode(53129443)
end end
function c43487744.activate(e,tp,eg,ep,ev,re,r,rp) function c43487744.activate(e,tp,eg,ep,ev,re,r,rp)
local cid=Duel.GetChainInfo(ev,CHAININFO_CHAIN_ID)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e1:SetTargetRange(LOCATION_MZONE,0) e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetValue(c43487744.indval) e1:SetValue(c43487744.indval)
e1:SetReset(RESET_CHAIN) e1:SetReset(RESET_CHAIN)
e1:SetLabel(ev) e1:SetLabel(cid)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
end end
function c43487744.indval(e,re,rp) function c43487744.indval(e,re,rp)
return Duel.GetCurrentChain()==e:GetLabel() return Duel.GetChainInfo(0,CHAININFO_CHAIN_ID)==e:GetLabel()
end end
...@@ -31,7 +31,6 @@ function c43841694.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -31,7 +31,6 @@ function c43841694.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
e:SetLabelObject(g1:GetFirst()) e:SetLabelObject(g1:GetFirst())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g2=Duel.SelectTarget(tp,c43841694.filter2,tp,LOCATION_REMOVED,0,1,2,nil) local g2=Duel.SelectTarget(tp,c43841694.filter2,tp,LOCATION_REMOVED,0,1,2,nil)
g1:Merge(g2)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g1,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g1,1,0,0)
end end
function c43841694.activate(e,tp,eg,ep,ev,re,r,rp) function c43841694.activate(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -8,7 +8,7 @@ function c44656491.initial_effect(c) ...@@ -8,7 +8,7 @@ function c44656491.initial_effect(c)
--cannot attack --cannot attack
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_ATTACK) e2:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE)
e2:SetRange(LOCATION_SZONE) e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e2:SetTarget(c44656491.atktarget) e2:SetTarget(c44656491.atktarget)
......
...@@ -43,7 +43,7 @@ end ...@@ -43,7 +43,7 @@ end
function c48576971.effcon(e,tp,eg,ep,ev,re,r,rp) function c48576971.effcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local ec=c:GetPreviousEquipTarget() local ec=c:GetPreviousEquipTarget()
return c:IsReason(REASON_LOST_TARGET) and ec:IsReason(REASON_BATTLE) return c:IsReason(REASON_LOST_TARGET) and ec:IsReason(REASON_BATTLE) and ec:GetPreviousControler()==tp
end end
function c48576971.efftg(e,tp,eg,ep,ev,re,r,rp,chk) function c48576971.efftg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
......
...@@ -32,18 +32,18 @@ function c5037726.cfilter(c) ...@@ -32,18 +32,18 @@ function c5037726.cfilter(c)
end end
function c5037726.operation(e,tp,eg,ep,ev,re,r,rp) function c5037726.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
local dis=false local g=Duel.GetMatchingGroup(c5037726.cfilter,tp,0,LOCATION_HAND,nil)
if Duel.IsChainDisablable(0) then if g:GetCount()>0 and Duel.SelectYesNo(1-tp,aux.Stringid(5037726,0)) then
local g=Duel.GetMatchingGroup(c5037726.cfilter,tp,0,LOCATION_HAND,nil) Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_CONFIRM)
if g:GetCount()>0 and Duel.SelectYesNo(1-tp,aux.Stringid(5037726,0)) then local sg=g:Select(1-tp,1,1,nil)
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_CONFIRM) Duel.ConfirmCards(tp,sg)
local sg=g:Select(1-tp,1,1,nil) Duel.ShuffleHand(1-tp)
Duel.ConfirmCards(tp,sg) if Duel.IsChainDisablable(0) then
Duel.ShuffleHand(1-tp) Duel.NegateEffect(0)
dis=true return
end end
end end
if not dis and tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end end
end end
...@@ -59,10 +59,10 @@ function c51589188.desfilter(c) ...@@ -59,10 +59,10 @@ function c51589188.desfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable()
end end
function c51589188.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c51589188.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and c51589188.desfilter(chkc) end if chkc then return chkc:IsOnField() and c51589188.desfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c51589188.desfilter,tp,0,LOCATION_ONFIELD,1,nil) end if chk==0 then return Duel.IsExistingTarget(c51589188.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c51589188.desfilter,tp,0,LOCATION_ONFIELD,1,1,nil) local g=Duel.SelectTarget(tp,c51589188.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end end
function c51589188.desop(e,tp,eg,ep,ev,re,r,rp) function c51589188.desop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -30,7 +30,7 @@ function c57827484.operation(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -30,7 +30,7 @@ function c57827484.operation(e,tp,eg,ep,ev,re,r,rp,chk)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DIRECT_ATTACK) e1:SetCode(EFFECT_DIRECT_ATTACK)
e1:SetReset(RESET_EVENT+0x1fe0000) e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
end end
end end
...@@ -23,7 +23,8 @@ function c58185394.sdfilter(c) ...@@ -23,7 +23,8 @@ function c58185394.sdfilter(c)
return c:IsFaceup() and c:IsCode(99171160) return c:IsFaceup() and c:IsCode(99171160)
end end
function c58185394.sdcon(e) function c58185394.sdcon(e)
return not Duel.IsExistingMatchingCard(c58185394.sdfilter,0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED)
and not Duel.IsExistingMatchingCard(c58185394.sdfilter,0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
end end
function c58185394.dmcon(e,tp,eg,ep,ev,re,r,rp) function c58185394.dmcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -49,7 +49,7 @@ end ...@@ -49,7 +49,7 @@ end
function c66976526.cfilter(c,tp) function c66976526.cfilter(c,tp)
local np=c:GetPosition() local np=c:GetPosition()
local pp=c:GetPreviousPosition() local pp=c:GetPreviousPosition()
return c:IsSetCard(0x11) and c:IsControler(tp) and ((pp==0x1 and np==0x4) or (pp==0x4 and np==0x1) or (pp==0x8 and np==0x1)) return c:IsSetCard(0x11) and c:IsControler(tp) and ((pp==0x1 and np==0x4) or (pp==0x4 and np==0x1))
end end
function c66976526.drcon(e,tp,eg,ep,ev,re,r,rp) function c66976526.drcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c66976526.cfilter,1,nil,tp) return eg:IsExists(c66976526.cfilter,1,nil,tp)
......
...@@ -26,12 +26,16 @@ function c67949763.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -26,12 +26,16 @@ function c67949763.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function c67949763.activate(e,tp,eg,ep,ev,re,r,rp) function c67949763.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if Duel.GetLocationCount(tp,LOCATION_MZONE)>2 if Duel.GetLocationCount(tp,LOCATION_MZONE)>2 then
and Duel.IsPlayerCanSpecialSummonMonster(tp,67949764,0x87,0x4011,atk,0,1,RACE_FIEND,ATTRIBUTE_DARK) then
local rfid=tc:GetRealFieldID() local rfid=tc:GetRealFieldID()
local atk=0 local atk=0
local cr=false local cr=false
if tc:IsFaceup() and tc:IsRelateToEffect(e) then if tc:IsFaceup() and tc:IsRelateToEffect(e) then
atk=tc:GetAttack()
cr=true
end
if not Duel.IsPlayerCanSpecialSummonMonster(tp,67949764,0x87,0x4011,atk,0,1,RACE_FIEND,ATTRIBUTE_DARK) then return end
if cr then
local de=Effect.CreateEffect(e:GetHandler()) local de=Effect.CreateEffect(e:GetHandler())
de:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) de:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
de:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) de:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
...@@ -39,8 +43,6 @@ function c67949763.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -39,8 +43,6 @@ function c67949763.activate(e,tp,eg,ep,ev,re,r,rp)
de:SetOperation(c67949763.desop) de:SetOperation(c67949763.desop)
de:SetLabel(rfid) de:SetLabel(rfid)
tc:RegisterEffect(de,true) tc:RegisterEffect(de,true)
atk=tc:GetAttack()
cr=true
end end
for i=1,3 do for i=1,3 do
local token=Duel.CreateToken(tp,67949764) local token=Duel.CreateToken(tp,67949764)
......
...@@ -23,17 +23,20 @@ function c69402394.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -23,17 +23,20 @@ function c69402394.target(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c69402394.activate(e,tp,eg,ep,ev,re,r,rp) function c69402394.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)<2 or Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)<2 then return end if Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)<2 or Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)<2 then return end
if Duel.IsChainDisablable(0) and Duel.SelectYesNo(1-tp,aux.Stringid(69402394,0)) then if Duel.SelectYesNo(1-tp,aux.Stringid(69402394,0)) then
Duel.DiscardHand(1-tp,aux.TRUE,1,1,REASON_EFFECT+REASON_DISCARD,nil) Duel.DiscardHand(1-tp,aux.TRUE,1,1,REASON_EFFECT+REASON_DISCARD,nil)
else if Duel.IsChainDisablable(0) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) Duel.NegateEffect(0)
local g1=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_HAND,0,2,2,nil) return
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_DISCARD) end
local g2=Duel.SelectMatchingCard(1-tp,aux.TRUE,1-tp,LOCATION_HAND,0,2,2,nil)
g1:Merge(g2)
Duel.SendtoGrave(g1,REASON_EFFECT+REASON_DISCARD)
Duel.BreakEffect()
Duel.Draw(tp,2,REASON_EFFECT)
Duel.Draw(1-tp,2,REASON_EFFECT)
end end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local g1=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_HAND,0,2,2,nil)
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_DISCARD)
local g2=Duel.SelectMatchingCard(1-tp,aux.TRUE,1-tp,LOCATION_HAND,0,2,2,nil)
g1:Merge(g2)
Duel.SendtoGrave(g1,REASON_EFFECT+REASON_DISCARD)
Duel.BreakEffect()
Duel.Draw(tp,2,REASON_EFFECT)
Duel.Draw(1-tp,2,REASON_EFFECT)
end end
...@@ -65,8 +65,8 @@ function c7452945.eqcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -65,8 +65,8 @@ function c7452945.eqcon(e,tp,eg,ep,ev,re,r,rp)
return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEUP) and c:IsReason(REASON_DESTROY) and c:CheckUniqueOnField(tp) return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEUP) and c:IsReason(REASON_DESTROY) and c:CheckUniqueOnField(tp)
end end
function c7452945.eqcost(e,tp,eg,ep,ev,re,r,rp,chk) function c7452945.eqcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,c7452945)==0 end if chk==0 then return Duel.GetFlagEffect(tp,7452945)==0 end
Duel.RegisterFlagEffect(tp,c7452945,RESET_PHASE+PHASE_END,0,1) Duel.RegisterFlagEffect(tp,7452945,RESET_PHASE+PHASE_END,0,1)
end end
function c7452945.eqfilter2(c) function c7452945.eqfilter2(c)
return c:IsFaceup() and c:IsSetCard(0x107a) and c:IsRace(RACE_WARRIOR) return c:IsFaceup() and c:IsSetCard(0x107a) and c:IsRace(RACE_WARRIOR)
......
...@@ -60,7 +60,7 @@ end ...@@ -60,7 +60,7 @@ end
function c75180828.desfilter(c) function c75180828.desfilter(c)
return c:IsDestructable() return c:IsDestructable()
end end
function c75180828.destg(e,tp,eg,ep,ev,re,r,rp,chk) function c75180828.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and c75180828.desfilter(chkc) end if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and c75180828.desfilter(chkc) end
if chk==0 then return true end if chk==0 then return true end
local ct=Duel.GetMatchingGroupCount(c75180828.descount,tp,LOCATION_GRAVE,0,nil) local ct=Duel.GetMatchingGroupCount(c75180828.descount,tp,LOCATION_GRAVE,0,nil)
......
...@@ -4,14 +4,14 @@ function c8323633.initial_effect(c) ...@@ -4,14 +4,14 @@ function c8323633.initial_effect(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetOperation(c8323633.target) e1:SetOperation(c8323633.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c8323633.target(e,tp,eg,ep,ev,re,r,rp,chk) function c8323633.operation(e,tp,eg,ep,ev,re,r,rp)
if chk==0 then return true end local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,564) Duel.Hint(HINT_SELECTMSG,tp,564)
local ac=Duel.AnnounceCard(tp) local ac=Duel.AnnounceCard(tp)
local c=e:GetHandler()
c:SetHint(CHINT_CARD,ac) c:SetHint(CHINT_CARD,ac)
--remove --remove
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
......
...@@ -41,12 +41,6 @@ function c83746708.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -41,12 +41,6 @@ function c83746708.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Equip(tp,e:GetHandler(),tc) Duel.Equip(tp,e:GetHandler(),tc)
end end
end end
function c83746708.filter(c)
return c:IsType(TYPE_SPELL) or c:IsType(TYPE_TRAP)
end
function c83746708.value(e,c) function c83746708.value(e,c)
local g=Duel.GetMatchingGroup(c83746708.filter,tp,LOCATION_ONFIELD,0,nil) return Duel.GetMatchingGroupCount(Card.IsType,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,nil,TYPE_SPELL+TYPE_TRAP)*500
return g:GetCount()*500
end end
...@@ -15,7 +15,7 @@ end ...@@ -15,7 +15,7 @@ end
function c87836938.drcon(e,tp,eg,ep,ev,re,r,rp) function c87836938.drcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local et=c:GetEquipCount() local et=c:GetEquipCount()
if et>0 and c:IsReason(REASON_EFFECT) and c:IsLocation(LOCATION_GRAVE) then if et>0 and c:IsReason(REASON_EFFECT) and c:IsReason(REASON_DESTROY) and c:IsLocation(LOCATION_GRAVE) then
e:SetLabel(et) e:SetLabel(et)
return true return true
else return false end else return false end
......
...@@ -22,7 +22,7 @@ function c93671934.initial_effect(c) ...@@ -22,7 +22,7 @@ function c93671934.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c93671934.recop(e,tp,eg,ep,ev,re,r,rp) function c93671934.recop(e,tp,eg,ep,ev,re,r,rp)
Duel.Recover(tp,1000,REASON_EFFECT) Duel.Recover(eg:GetFirst():GetControler(),1000,REASON_EFFECT)
end end
function c93671934.filter(c) function c93671934.filter(c)
return c:GetEquipTarget()~=nil or c:IsReason(REASON_LOST_TARGET) return c:GetEquipTarget()~=nil or c:IsReason(REASON_LOST_TARGET)
...@@ -31,5 +31,11 @@ function c93671934.damcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -31,5 +31,11 @@ function c93671934.damcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c93671934.filter,1,nil) return eg:IsExists(c93671934.filter,1,nil)
end end
function c93671934.damop(e,tp,eg,ep,ev,re,r,rp) function c93671934.damop(e,tp,eg,ep,ev,re,r,rp)
Duel.Damage(tp,1000,REASON_EFFECT) local g=eg:Filter(c93671934.filter,nil)
if g:IsExists(Card.IsControler,1,nil,tp) then
Duel.Damage(tp,1000,REASON_EFFECT)
end
if g:IsExists(Card.IsControler,1,nil,1-tp) then
Duel.Damage(1-tp,1000,REASON_EFFECT)
end
end end
...@@ -27,15 +27,20 @@ function c967928.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -27,15 +27,20 @@ function c967928.activate(e,tp,eg,ep,ev,re,r,rp)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0) e1:SetTargetRange(1,0)
e1:SetCode(EFFECT_SKIP_DP) e1:SetCode(EFFECT_CANNOT_DRAW)
if Duel.GetTurnPlayer()==p and Duel.GetCurrentPhase()==PHASE_DRAW then if Duel.GetTurnPlayer()==p and Duel.GetCurrentPhase()==PHASE_DRAW then
e1:SetReset(RESET_PHASE+PHASE_DRAW+RESET_SELF_TURN,2) e1:SetReset(RESET_PHASE+PHASE_DRAW+RESET_SELF_TURN,2)
e1:SetLabel(Duel.GetTurnCount()) e1:SetLabel(Duel.GetTurnCount())
e1:SetCondition(c967928.skipcon)
else else
e1:SetReset(RESET_PHASE+PHASE_DRAW+RESET_SELF_TURN) e1:SetReset(RESET_PHASE+PHASE_DRAW+RESET_SELF_TURN)
e1:SetLabel(0)
end end
e1:SetCondition(c967928.skipcon)
Duel.RegisterEffect(e1,p) Duel.RegisterEffect(e1,p)
local e2=e1:Clone()
e2:SetCode(EFFECT_DRAW_COUNT)
e2:SetValue(0)
Duel.RegisterEffect(e2,p)
else else
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
...@@ -48,7 +53,7 @@ function c967928.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -48,7 +53,7 @@ function c967928.activate(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c967928.skipcon(e) function c967928.skipcon(e)
return Duel.GetTurnCount()~=e:GetLabel() return Duel.GetTurnCount()~=e:GetLabel() and Duel.GetCurrentPhase()==PHASE_DRAW
end end
function c967928.aclimit(e,re,tp) function c967928.aclimit(e,re,tp)
return re:IsHasType(EFFECT_TYPE_ACTIVATE) return re:IsHasType(EFFECT_TYPE_ACTIVATE)
......
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