Commit 05cb28f9 authored by salix5's avatar salix5 Committed by VanillaSalt

fix: EFFECT_FLIP_O

EFFECT_FLIP_O
In Master Rule 3, all flip effect are changed into trigger effect.
Some of them become optional trigger effect, and their type is changed into EFFECT_TYPE_FLIP_O, which is the same as EFFECT_TYPE_TRIGGER_O now.
Their target checkings are fixed.
parent 199245da
...@@ -3,13 +3,15 @@ function c27189308.initial_effect(c) ...@@ -3,13 +3,15 @@ function c27189308.initial_effect(c)
--flip --flip
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP_O)
e1:SetCode(EVENT_FLIP)
e1:SetTarget(c27189308.target) e1:SetTarget(c27189308.target)
e1:SetOperation(c27189308.operation) e1:SetOperation(c27189308.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c27189308.target(e,tp,eg,ep,ev,re,r,rp,chk) function c27189308.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c27189308.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end end
function c27189308.filter(c,e,tp) function c27189308.filter(c,e,tp)
...@@ -18,7 +20,7 @@ end ...@@ -18,7 +20,7 @@ end
function c27189308.operation(e,tp,eg,ep,ev,re,r,rp) function c27189308.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local g=Duel.GetMatchingGroup(c27189308.filter,tp,LOCATION_DECK,0,nil,e,tp) local g=Duel.GetMatchingGroup(c27189308.filter,tp,LOCATION_DECK,0,nil,e,tp)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(27189308,0)) then if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil) local sg=g:Select(tp,1,1,nil)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
......
...@@ -5,20 +5,18 @@ function c28357177.initial_effect(c) ...@@ -5,20 +5,18 @@ function c28357177.initial_effect(c)
e1:SetDescription(aux.Stringid(28357177,0)) e1:SetDescription(aux.Stringid(28357177,0))
e1:SetCategory(CATEGORY_TOHAND) e1:SetCategory(CATEGORY_TOHAND)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP_O)
e1:SetCode(EVENT_FLIP)
e1:SetTarget(c28357177.target) e1:SetTarget(c28357177.target)
e1:SetOperation(c28357177.operation) e1:SetOperation(c28357177.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c28357177.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c28357177.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsAbleToHand() end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsAbleToHand() end
if chk==0 then return true end if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToHand,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
if Duel.IsExistingTarget(Card.IsAbleToHand,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(28357177,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,LOCATION_MZONE,LOCATION_MZONE,1,3,nil) local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,LOCATION_MZONE,LOCATION_MZONE,1,3,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0)
end
end end
function c28357177.operation(e,tp,eg,ep,ev,re,r,rp) function c28357177.operation(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
......
...@@ -4,7 +4,8 @@ function c30608985.initial_effect(c) ...@@ -4,7 +4,8 @@ function c30608985.initial_effect(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(30608985,0)) e1:SetDescription(aux.Stringid(30608985,0))
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP_O)
e1:SetCode(EVENT_FLIP)
e1:SetTarget(c30608985.target) e1:SetTarget(c30608985.target)
e1:SetOperation(c30608985.operation) e1:SetOperation(c30608985.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -14,17 +15,12 @@ function c30608985.spfilter(c,e,tp) ...@@ -14,17 +15,12 @@ function c30608985.spfilter(c,e,tp)
end end
function c30608985.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c30608985.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c30608985.spfilter(chkc,e,tp) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c30608985.spfilter(chkc,e,tp) end
if chk==0 then return true end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingTarget(c30608985.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
and Duel.IsExistingTarget(c30608985.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp)
and Duel.SelectYesNo(tp,aux.Stringid(30608985,1)) then
e:SetCategory(CATEGORY_SPECIAL_SUMMON) e:SetCategory(CATEGORY_SPECIAL_SUMMON)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c30608985.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) local g=Duel.SelectTarget(tp,c30608985.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0)
else
e:SetCategory(0)
end
end end
function c30608985.operation(e,tp,eg,ep,ev,re,r,rp) function c30608985.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
......
...@@ -5,7 +5,8 @@ function c48659020.initial_effect(c) ...@@ -5,7 +5,8 @@ function c48659020.initial_effect(c)
e1:SetDescription(aux.Stringid(48659020,0)) e1:SetDescription(aux.Stringid(48659020,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP_O)
e1:SetCode(EVENT_FLIP)
e1:SetTarget(c48659020.target) e1:SetTarget(c48659020.target)
e1:SetOperation(c48659020.operation) e1:SetOperation(c48659020.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -15,7 +16,8 @@ function c48659020.filter(c,e,tp) ...@@ -15,7 +16,8 @@ function c48659020.filter(c,e,tp)
end end
function c48659020.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c48659020.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c48659020.filter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c48659020.filter(chkc,e,tp) end
if chk==0 then return true end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c48659020.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c48659020.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) local g=Duel.SelectTarget(tp,c48659020.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0)
......
...@@ -4,13 +4,15 @@ function c5220687.initial_effect(c) ...@@ -4,13 +4,15 @@ function c5220687.initial_effect(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(5220687,0)) e1:SetDescription(aux.Stringid(5220687,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP_O)
e1:SetCode(EVENT_FLIP)
e1:SetTarget(c5220687.target) e1:SetTarget(c5220687.target)
e1:SetOperation(c5220687.operation) e1:SetOperation(c5220687.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c5220687.target(e,tp,eg,ep,ev,re,r,rp,chk) function c5220687.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c5220687.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end end
function c5220687.filter(c,e,tp) function c5220687.filter(c,e,tp)
...@@ -19,7 +21,7 @@ end ...@@ -19,7 +21,7 @@ end
function c5220687.operation(e,tp,eg,ep,ev,re,r,rp) function c5220687.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local g=Duel.GetMatchingGroup(c5220687.filter,tp,LOCATION_DECK,0,nil,e,tp) local g=Duel.GetMatchingGroup(c5220687.filter,tp,LOCATION_DECK,0,nil,e,tp)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(5220687,1)) then if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil) local sg=g:Select(tp,1,1,nil)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEDOWN_DEFENCE) Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEDOWN_DEFENCE)
......
...@@ -4,13 +4,15 @@ function c6104968.initial_effect(c) ...@@ -4,13 +4,15 @@ function c6104968.initial_effect(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(6104968,0)) e1:SetDescription(aux.Stringid(6104968,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP_O)
e1:SetCode(EVENT_FLIP)
e1:SetTarget(c6104968.target) e1:SetTarget(c6104968.target)
e1:SetOperation(c6104968.operation) e1:SetOperation(c6104968.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c6104968.target(e,tp,eg,ep,ev,re,r,rp,chk) function c6104968.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c6104968.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end end
function c6104968.filter(c,e,tp) function c6104968.filter(c,e,tp)
...@@ -19,7 +21,7 @@ end ...@@ -19,7 +21,7 @@ end
function c6104968.operation(e,tp,eg,ep,ev,re,r,rp) function c6104968.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local tc=Duel.GetFirstMatchingCard(c6104968.filter,tp,LOCATION_DECK,0,nil,e,tp) local tc=Duel.GetFirstMatchingCard(c6104968.filter,tp,LOCATION_DECK,0,nil,e,tp)
if tc and Duel.SelectYesNo(tp,aux.Stringid(6104968,1)) then if tc then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEDOWN_DEFENCE) Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEDOWN_DEFENCE)
Duel.ConfirmCards(1-tp,tc) Duel.ConfirmCards(1-tp,tc)
end end
......
...@@ -4,7 +4,8 @@ function c64734090.initial_effect(c) ...@@ -4,7 +4,8 @@ function c64734090.initial_effect(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(64734090,0)) e1:SetDescription(aux.Stringid(64734090,0))
e1:SetCategory(CATEGORY_TOHAND) e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_FLIP+EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP_O)
e1:SetCode(EVENT_FLIP)
e1:SetTarget(c64734090.tg) e1:SetTarget(c64734090.tg)
e1:SetOperation(c64734090.op) e1:SetOperation(c64734090.op)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -13,12 +14,12 @@ function c64734090.filter(c) ...@@ -13,12 +14,12 @@ function c64734090.filter(c)
return c:IsCode(1264319) and c:IsAbleToHand() return c:IsCode(1264319) and c:IsAbleToHand()
end end
function c64734090.tg(e,tp,eg,ep,ev,re,r,rp,chk) function c64734090.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return Duel.IsExistingMatchingCard(c64734090.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end end
function c64734090.op(e,tp,eg,ep,ev,re,r,rp) function c64734090.op(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c64734090.filter,tp,LOCATION_DECK,0,nil) local g=Duel.GetMatchingGroup(c64734090.filter,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(64734090,1)) then if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil) local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT) Duel.SendtoHand(sg,nil,REASON_EFFECT)
......
...@@ -3,7 +3,8 @@ function c71315423.initial_effect(c) ...@@ -3,7 +3,8 @@ function c71315423.initial_effect(c)
--flip --flip
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP) e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_FLIP+EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP_O)
e1:SetCode(EVENT_FLIP)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(c71315423.eqtg) e1:SetTarget(c71315423.eqtg)
e1:SetOperation(c71315423.eqop) e1:SetOperation(c71315423.eqop)
......
--Dܩ` --Dボーイズ
function c79279397.initial_effect(c) function c79279397.initial_effect(c)
--spsummon --spsummon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(79279397,0)) e1:SetDescription(aux.Stringid(79279397,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FLIP+EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP_O)
e1:SetCode(EVENT_FLIP)
e1:SetTarget(c79279397.target)
e1:SetOperation(c79279397.spop) e1:SetOperation(c79279397.spop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c79279397.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c79279397.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c79279397.filter(c,e,tp) function c79279397.filter(c,e,tp)
return c:IsCode(79279397) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsCode(79279397) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c79279397.spop(e,tp,eg,ep,ev,re,r,rp) function c79279397.spop(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g=Duel.GetMatchingGroup(c79279397.filter,tp,LOCATION_DECK,0,nil,e,tp) local g=Duel.GetMatchingGroup(c79279397.filter,tp,LOCATION_DECK,0,nil,e,tp)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(79279397,1)) then if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,ft,nil) local sg=g:Select(tp,1,ft,nil)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP_ATTACK) Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP_ATTACK)
......
...@@ -4,7 +4,8 @@ function c92784374.initial_effect(c) ...@@ -4,7 +4,8 @@ function c92784374.initial_effect(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(92784374,0)) e1:SetDescription(aux.Stringid(92784374,0))
e1:SetCategory(CATEGORY_TOHAND) e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_FLIP+EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP_O)
e1:SetCode(EVENT_FLIP)
e1:SetTarget(c92784374.tg) e1:SetTarget(c92784374.tg)
e1:SetOperation(c92784374.op) e1:SetOperation(c92784374.op)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -13,12 +14,12 @@ function c92784374.filter(c) ...@@ -13,12 +14,12 @@ function c92784374.filter(c)
return c:IsSetCard(0x3a) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() return c:IsSetCard(0x3a) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end end
function c92784374.tg(e,tp,eg,ep,ev,re,r,rp,chk) function c92784374.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return Duel.IsExistingMatchingCard(c92784374.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end end
function c92784374.op(e,tp,eg,ep,ev,re,r,rp) function c92784374.op(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c92784374.filter,tp,LOCATION_DECK,0,nil) local g=Duel.GetMatchingGroup(c92784374.filter,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(92784374,1)) then if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil) local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT) Duel.SendtoHand(sg,nil,REASON_EFFECT)
......
...@@ -5,19 +5,18 @@ function c93920745.initial_effect(c) ...@@ -5,19 +5,18 @@ function c93920745.initial_effect(c)
e1:SetDescription(aux.Stringid(93920745,0)) e1:SetDescription(aux.Stringid(93920745,0))
e1:SetCategory(CATEGORY_TOHAND) e1:SetCategory(CATEGORY_TOHAND)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP_O)
e1:SetCode(EVENT_FLIP)
e1:SetTarget(c93920745.target) e1:SetTarget(c93920745.target)
e1:SetOperation(c93920745.operation) e1:SetOperation(c93920745.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c93920745.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c93920745.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsAbleToHand() end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsAbleToHand() end
if chk==0 then return true end if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToHand,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
if Duel.IsExistingTarget(Card.IsAbleToHand,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(93920745,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,LOCATION_MZONE,LOCATION_MZONE,1,2,nil) local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,LOCATION_MZONE,LOCATION_MZONE,1,2,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0)
end
end end
function c93920745.operation(e,tp,eg,ep,ev,re,r,rp) function c93920745.operation(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
......
...@@ -4,34 +4,25 @@ function c94230224.initial_effect(c) ...@@ -4,34 +4,25 @@ function c94230224.initial_effect(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(94230224,0)) e1:SetDescription(aux.Stringid(94230224,0))
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP_O)
e1:SetCode(EVENT_FLIP)
e1:SetCost(c94230224.cost) e1:SetCost(c94230224.cost)
e1:SetTarget(c94230224.target) e1:SetTarget(c94230224.target)
e1:SetOperation(c94230224.operation) e1:SetOperation(c94230224.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c94230224.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c94230224.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return Duel.CheckLPCost(tp,2000) end
if Duel.CheckLPCost(tp,2000) and Duel.SelectYesNo(tp,aux.Stringid(94230224,1)) then
Duel.PayLPCost(tp,2000) Duel.PayLPCost(tp,2000)
e:SetLabel(1)
e:SetCategory(CATEGORY_DAMAGE) e:SetCategory(CATEGORY_DAMAGE)
else
e:SetLabel(0)
e:SetCategory(0)
end
end end
function c94230224.target(e,tp,eg,ep,ev,re,r,rp,chk) function c94230224.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
if e:GetLabel()==1 then
Duel.SetTargetPlayer(1-tp) Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(1000) Duel.SetTargetParam(1000)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1000) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1000)
end
end end
function c94230224.operation(e,tp,eg,ep,ev,re,r,rp) function c94230224.operation(e,tp,eg,ep,ev,re,r,rp)
if e:GetLabel()==1 then
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Damage(p,d,REASON_EFFECT) Duel.Damage(p,d,REASON_EFFECT)
end
end end
...@@ -216,13 +216,15 @@ EFFECT_TYPE_FIELD =0x0002 -- ...@@ -216,13 +216,15 @@ EFFECT_TYPE_FIELD =0x0002 --
EFFECT_TYPE_EQUIP =0x0004 -- EFFECT_TYPE_EQUIP =0x0004 --
EFFECT_TYPE_ACTIONS =0x0008 -- EFFECT_TYPE_ACTIONS =0x0008 --
EFFECT_TYPE_ACTIVATE =0x0010 -- EFFECT_TYPE_ACTIVATE =0x0010 --
EFFECT_TYPE_FLIP =0x0020 -- --EFFECT_TYPE_FLIP =0x0020 --
EFFECT_TYPE_IGNITION =0x0040 -- EFFECT_TYPE_IGNITION =0x0040 --
EFFECT_TYPE_TRIGGER_O =0x0080 -- EFFECT_TYPE_TRIGGER_O =0x0080 --
EFFECT_TYPE_QUICK_O =0x0100 -- EFFECT_TYPE_QUICK_O =0x0100 --
EFFECT_TYPE_TRIGGER_F =0x0200 -- EFFECT_TYPE_TRIGGER_F =0x0200 --
EFFECT_TYPE_QUICK_F =0x0400 -- EFFECT_TYPE_QUICK_F =0x0400 --
EFFECT_TYPE_CONTINUOUS =0x0800 -- EFFECT_TYPE_CONTINUOUS =0x0800 --
EFFECT_TYPE_FLIP =EFFECT_TYPE_TRIGGER_F --
EFFECT_TYPE_FLIP_O =EFFECT_TYPE_TRIGGER_O
--========== Flags ========== --========== Flags ==========
EFFECT_FLAG_INITIAL =0x0001 -- EFFECT_FLAG_INITIAL =0x0001 --
......
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