Commit 9178ce87 authored by TanakaKotoha's avatar TanakaKotoha

ladies and xiangqinmen

parent 6a4a2762
...@@ -117,7 +117,7 @@ function spo.pencon(e,tp,eg,ep,ev,re,r,rp) ...@@ -117,7 +117,7 @@ function spo.pencon(e,tp,eg,ep,ev,re,r,rp)
end end
if cm then if cm then
cm.named_with_Spositch=1 cm.named_with_Spositch=1 end
function cm.initial_effect(c) function cm.initial_effect(c)
--splimit --splimit
spo.splimit(c) spo.splimit(c)
......
...@@ -65,6 +65,7 @@ function c16100002.op(e,tp,eg,ep,ev,re,r,rp) ...@@ -65,6 +65,7 @@ function c16100002.op(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c16100002.tgf,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c16100002.tgf,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(tp,g)
end end
end end
-- --
...@@ -101,6 +102,7 @@ function c16100002.repop(e,tp,eg,ep,ev,re,r,rp) ...@@ -101,6 +102,7 @@ function c16100002.repop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_CONFIRM) Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_CONFIRM)
sg=g:Select(1-tp,1,1,nil) sg=g:Select(1-tp,1,1,nil)
Duel.SendtoHand(sg,tp,REASON_EFFECT) Duel.SendtoHand(sg,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end end
end end
-- --
......
...@@ -18,7 +18,7 @@ function c16100006.initial_effect(c) ...@@ -18,7 +18,7 @@ function c16100006.initial_effect(c)
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE) e2:SetRange(LOCATION_GRAVE)
e1:SetCountLimit(1,16100006+100) e2:SetCountLimit(1,16100006+100)
e2:SetCost(c16100006.cost) e2:SetCost(c16100006.cost)
e2:SetTarget(c16100006.tg) e2:SetTarget(c16100006.tg)
e2:SetOperation(c16100006.op) e2:SetOperation(c16100006.op)
......
--黑白熊 ふわふわ --黑白熊 ふわふわ
function c16100007.initial_effect(c) local s=c16100007
local id=16100007
function s.initial_effect(c)
c:EnableCounterPermit(0xccf) c:EnableCounterPermit(0xccf)
--Cannot to grave --Cannot to grave
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(16100007,0)) e1:SetDescription(aux.Stringid(id,0))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EVENT_PHASE+PHASE_DRAW) e1:SetCode(EVENT_PHASE+PHASE_DRAW)
e1:SetRange(LOCATION_HAND) e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,16100007) e1:SetCountLimit(1,id)
e1:SetCondition(c16100007.con) e1:SetCondition(s.con)
e1:SetOperation(c16100007.op) e1:SetOperation(s.op)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--Recover --Recover
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(16100007,1)) e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_RECOVER) e2:SetCategory(CATEGORY_RECOVER)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE) e2:SetCode(EVENT_TO_GRAVE)
e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,16100007+10000) e2:SetCountLimit(1,id+100)
e2:SetOperation(c16100007.operation) e2:SetOperation(s.operation)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c16100007.cfilter(c) function s.cfilter(c)
return c:IsSetCard(0xcc0) and not c:IsSetCard(0xccd) return c:IsSetCard(0xcc0) and not c:IsSetCard(0xccd)
end end
function c16100007.con(e,tp) function s.con(e,tp)
local g=Duel.GetFieldGroup(e:GetHandlerPlayer(),LOCATION_ONFIELD+LOCATION_HAND,0) return (not Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,1,nil)) and Duel.GetTurnPlayer()==tp
return (not g:IsExists(c16100007.cfilter,1,nil)) and Duel.GetTurnPlayer()==tp
end end
function c16100007.op(e,tp,eg,ep,ev,re,r,rp) function s.ctg(e,c,tp)
return c:IsLocation(LOCATION_DECK)
end
function s.op(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_TO_GRAVE) e1:SetCode(EFFECT_CANNOT_TO_GRAVE)
e1:SetTargetRange(1,0) e1:SetTargetRange(1,0)
e1:SetTarget(function(e,c,tp) e1:SetTarget(s.ctg)
return c:IsLocation(LOCATION_DECK)
end)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
local e2=e1:Clone() local e2=e1:Clone()
...@@ -46,8 +48,12 @@ function c16100007.op(e,tp,eg,ep,ev,re,r,rp) ...@@ -46,8 +48,12 @@ function c16100007.op(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterEffect(e2,tp) Duel.RegisterEffect(e2,tp)
if e:GetHandler():IsRelateToEffect(e) then if e:GetHandler():IsRelateToEffect(e) then
Duel.SendtoHand(e:GetHandler(),1-tp,REASON_EFFECT) Duel.SendtoHand(e:GetHandler(),1-tp,REASON_EFFECT)
Duel.ConfirmCards(tp,e:GetHandler())
end end
end end
function c16100007.operation(e,tp,eg,ep,ev,re,r,rp) function s.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.Recover(tp,1000,REASON_EFFECT) Duel.Recover(tp,1000,REASON_EFFECT)
end
end end
--像素熊 --像素熊
function c16100009.initial_effect(c) local s=c16100009
local id=16100009
function s.initial_effect(c)
c:EnableCounterPermit(0xccf) c:EnableCounterPermit(0xccf)
--ac or sp --ac or sp
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(16100009,0)) e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_TO_HAND) e1:SetCode(EVENT_TO_HAND)
e1:SetCountLimit(1,16100009) e1:SetCountLimit(1,id)
e1:SetCondition(c16100009.condition) e1:SetCondition(s.condition)
e1:SetOperation(c16100009.op) e1:SetOperation(s.op)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--tohand --tohand
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(16100009,1)) e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_RECOVER) e2:SetCategory(CATEGORY_TOHAND+CATEGORY_RECOVER)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE) e2:SetCode(EVENT_TO_GRAVE)
e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,EFFECT_COUNT_CODE_DUEL) e2:SetCountLimit(1,id+EFFECT_COUNT_CODE_DUEL)
e2:SetOperation(c16100009.operation) e2:SetTarget(s.tg)
e2:SetOperation(s.operation)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
-- --
function c16100009.condition(e,tp,eg,ep,ev,re,r,rp) function s.condition(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsReason(REASON_DRAW) return not e:GetHandler():IsReason(REASON_DRAW)
end end
-- --
function c16100009.filter(c) function s.filter(c)
return c:IsSetCard(0xcc0) and not c:IsSetCard(0xccd) return c:IsSetCard(0xcc0) and not c:IsSetCard(0xccd)
end end
-- --
function c16100009.filter1(c) function s.filter1(c)
return c:IsCode(16100002) return c:IsCode(16100002)
end end
-- --
function c16100009.op(e,tp,eg,ep,ev,re,r,rp) function s.op(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsExistingMatchingCard(c16100013.filter,tp,LOCATION_MZONE+LOCATION_HAND,0,1,nil) then if not Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_MZONE+LOCATION_HAND,0,1,nil) then
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_CANNOT_ACTIVATE) e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END,2)
e1:SetTargetRange(1,0) e1:SetTargetRange(1,0)
e1:SetValue(c16100009.disop) e1:SetValue(s.disop)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
else else
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)
end end
end end
-- --
function c16100009.disop(e,re,tp) function s.disop(e,re,tp)
local rc=re:GetHandler() local rc=re:GetHandler()
return rc:IsLocation(LOCATION_HAND) and (not rc:IsSetCard(0xcc0)) and not rc:IsImmuneToEffect(e) return rc:IsLocation(LOCATION_HAND) and (not rc:IsSetCard(0xcc0)) and not rc:IsImmuneToEffect(e)
end end
-- --
function c16100009.operation(e,tp,eg,ep,ev,re,r,rp) function s.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if not Duel.IsExistingMatchingCard(c16100009.filter1,tp,LOCATION_ONFIELD,0,1,nil) then if chk==0 then return Duel.IsPlayerCanSendtoHand(1-tp,e:GetHandler()) end
Duel.SetTargetPlayer(tp)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,1-tp,0)
end
--
function s.operation(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then
if not Duel.IsExistingMatchingCard(s.filter1,tp,LOCATION_ONFIELD,0,1,nil) then
local lp=Duel.GetLP(tp) local lp=Duel.GetLP(tp)
Duel.SetLP(tp,lp-1000) end Duel.SetLP(tp,lp-1000)
if Duel.IsExistingMatchingCard(c16100009.filter1,tp,LOCATION_ONFIELD,0,1,nil) then else
Duel.Recover(tp,1000,REASON_EFFECT) end Duel.Recover(tp,1000,REASON_EFFECT) end
Duel.SendtoHand(e:GetHandler(),1-tp,REASON_EFFECT) Duel.SendtoHand(e:GetHandler(),1-tp,REASON_EFFECT)
Duel.ConfirmCards(tp,e:GetHandler()) Duel.ConfirmCards(tp,e:GetHandler())
end
end end
-- --
\ No newline at end of file
...@@ -69,6 +69,7 @@ function c16100010.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -69,6 +69,7 @@ function c16100010.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
sg=g:Select(tp,1,1,nil) sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,1-tp,REASON_EFFECT) Duel.SendtoHand(sg,1-tp,REASON_EFFECT)
Duel.ConfirmCards(tp,sg)
end end
end end
end end
......
--绝望一闪 黑白熊病毒 --绝望一闪 黑白熊病毒
function c16100013.initial_effect(c) local s=c16100013
local id=16100013
function s.initial_effect(c)
c:EnableCounterPermit(0xccf) c:EnableCounterPermit(0xccf)
--ac or sp --ac or sp
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_TO_HAND) e1:SetCode(EVENT_TO_HAND)
e1:SetCountLimit(1,16100013) e1:SetCountLimit(1,id)
e1:SetCondition(c16100013.condition) e1:SetCondition(s.condition)
e1:SetOperation(c16100013.op) e1:SetOperation(s.op)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--tohand --tohand
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(16100013,0)) e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_RECOVER) e2:SetCategory(CATEGORY_TOHAND+CATEGORY_RECOVER)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE) e2:SetCode(EVENT_TO_GRAVE)
e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,EFFECT_COUNT_CODE_DUEL) e2:SetCountLimit(1,id+EFFECT_COUNT_CODE_DUEL)
e2:SetOperation(c16100013.operation) e2:SetTarget(s.tg)
e2:SetOperation(s.operation)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
-- --
function c16100013.condition(e,tp,eg,ep,ev,re,r,rp) function s.condition(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsReason(REASON_DRAW) return not e:GetHandler():IsReason(REASON_DRAW)
end end
-- --
function c16100013.filter(c) function s.filter(c)
return c:IsSetCard(0xcc0) and not c:IsSetCard(0xccd) return c:IsSetCard(0xcc0) and not c:IsSetCard(0xccd)
end end
-- --
function c16100013.filter1(c) function s.filter1(c)
return c:IsCode(16100002) return c:IsCode(16100002)
end end
-- --
function c16100013.op(e,tp,eg,ep,ev,re,r,rp) function s.op(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsExistingMatchingCard(c16100013.filter,tp,LOCATION_MZONE+LOCATION_HAND,0,1,nil) then if not e:GetHandler():IsRelateToEffect(e) then return end
if not Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_MZONE+LOCATION_HAND,0,1,nil) then
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_CANNOT_REMOVE) e1:SetCode(EFFECT_CANNOT_REMOVE)
...@@ -48,18 +52,21 @@ function c16100013.op(e,tp,eg,ep,ev,re,r,rp) ...@@ -48,18 +52,21 @@ function c16100013.op(e,tp,eg,ep,ev,re,r,rp)
end end
end end
-- --
function c16100013.discon(e,tp,eg,ep,ev,re,r,rp) function s.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION) if chk==0 then return Duel.IsPlayerCanSendtoHand(1-tp,e:GetHandler()) end
return ep==tp and loc==LOCATION_HAND Duel.SetTargetPlayer(tp)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,1-tp,0)
end end
-- --
function c16100013.operation(e,tp,eg,ep,ev,re,r,rp) function s.operation(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsExistingMatchingCard(c16100013.filter1,tp,LOCATION_ONFIELD,0,1,nil) then if e:GetHandler():IsRelateToEffect(e) then
if not Duel.IsExistingMatchingCard(s.filter1,tp,LOCATION_ONFIELD,0,1,nil) then
local lp=Duel.GetLP(tp) local lp=Duel.GetLP(tp)
Duel.SetLP(tp,lp-1000) end Duel.SetLP(tp,lp-1000)
if Duel.IsExistingMatchingCard(c16100013.filter1,tp,LOCATION_ONFIELD,0,1,nil) then else
Duel.Recover(tp,1000,REASON_EFFECT) end Duel.Recover(tp,1000,REASON_EFFECT) end
Duel.SendtoHand(e:GetHandler(),1-tp,REASON_EFFECT) Duel.SendtoHand(e:GetHandler(),1-tp,REASON_EFFECT)
Duel.ConfirmCards(tp,e:GetHandler()) Duel.ConfirmCards(tp,e:GetHandler())
end
end end
-- --
...@@ -132,6 +132,7 @@ function c16100014.op1(e,tp,eg,ep,ev,re,r,rp) ...@@ -132,6 +132,7 @@ function c16100014.op1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
sg=g1:Select(tp,1,1,nil) sg=g1:Select(tp,1,1,nil)
Duel.SendtoHand(sg,1-tp,REASON_EFFECT) Duel.SendtoHand(sg,1-tp,REASON_EFFECT)
Duel.ConfirmCards(tp,sg)
end end
end end
else else
...@@ -150,6 +151,7 @@ function c16100014.op1(e,tp,eg,ep,ev,re,r,rp) ...@@ -150,6 +151,7 @@ function c16100014.op1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
sg=g1:Select(tp,1,1,nil) sg=g1:Select(tp,1,1,nil)
Duel.SendtoHand(sg,1-tp,REASON_EFFECT) Duel.SendtoHand(sg,1-tp,REASON_EFFECT)
Duel.ConfirmCards(tp,sg)
end end
end end
end end
......
...@@ -28,7 +28,7 @@ function c33310210.initial_effect(c) ...@@ -28,7 +28,7 @@ function c33310210.initial_effect(c)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) e5:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e5:SetCode(EVENT_LEAVE_FIELD) e5:SetCode(EVENT_LEAVE_FIELD)
e5:SetCountLimit(1,33310211) e5:SetCountLimit(1,33311211)
e5:SetCondition(c33310210.spcon) e5:SetCondition(c33310210.spcon)
e5:SetTarget(c33310210.sptg) e5:SetTarget(c33310210.sptg)
e5:SetOperation(c33310210.spop) e5:SetOperation(c33310210.spop)
......
...@@ -80,11 +80,6 @@ function c33310211.opdisable(e,tp,eg,ep,ev,re,r,rp) ...@@ -80,11 +80,6 @@ function c33310211.opdisable(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetOperatedGroup() local g=Duel.GetOperatedGroup()
local gc=g:GetFirst() local gc=g:GetFirst()
Duel.ConfirmCards(1-tp,gc) Duel.ConfirmCards(1-tp,gc)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_PUBLIC)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
gc:RegisterEffect(e1)
if gc:IsSetCard(0x551) and Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(33310211,3)) then if gc:IsSetCard(0x551) and Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(33310211,3)) then
local sg=Duel.SelectMatchingCard(tp,Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,1,nil) local sg=Duel.SelectMatchingCard(tp,Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.HintSelection(sg) Duel.HintSelection(sg)
......
...@@ -33,7 +33,7 @@ function rsnm.SummonFun(c,code,type2,isgrave,istograve) ...@@ -33,7 +33,7 @@ function rsnm.SummonFun(c,code,type2,isgrave,istograve)
end end
function rsnm.counterfilter(c) function rsnm.counterfilter(c)
if c:GetSummonLocation()&LOCATION_HAND+LOCATION_DECK ==0 then return true end if c:GetSummonLocation()&LOCATION_HAND+LOCATION_DECK ==0 then return true end
return c:IsSetCard(0x4552) return c:IsSetCard(0x6552)
end end
function rsnm.spcfilter(c,tp) function rsnm.spcfilter(c,tp)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToDeckAsCost() and Duel.GetMZoneCount(tp,c,tp)>0 return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToDeckAsCost() and Duel.GetMZoneCount(tp,c,tp)>0
...@@ -50,7 +50,7 @@ function rsnm.spop(e,tp) ...@@ -50,7 +50,7 @@ function rsnm.spop(e,tp)
end end
function rsnm.spcfilter2(c,e) function rsnm.spcfilter2(c,e)
local val=e:GetValue() local val=e:GetValue()
return c:IsSetCard(0x4552) and ((val==0 and c:IsAbleToDeckOrExtraAsCost()) or (val==1 and c:IsAbleToGraveAsCost())) return c:IsSetCard(0x6552) and ((val==0 and c:IsAbleToDeckOrExtraAsCost()) or (val==1 and c:IsAbleToGraveAsCost()))
end end
function rsnm.spcfilter3(g,tp,loc) function rsnm.spcfilter3(g,tp,loc)
return Duel.GetMZoneCount(tp,g,tp)>0 and ((loc==LOCATION_ONFIELD and #g==1) or (loc==LOCATION_GRAVE and #g==2)) return Duel.GetMZoneCount(tp,g,tp)>0 and ((loc==LOCATION_ONFIELD and #g==1) or (loc==LOCATION_GRAVE and #g==2))
...@@ -92,7 +92,7 @@ function rsnm.limop(e,tp,eg,ep,ev,re,r,rp) ...@@ -92,7 +92,7 @@ function rsnm.limop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
end end
function rsnm.splimit(e,c) function rsnm.splimit(e,c)
if c:IsLocation(LOCATION_HAND+LOCATION_DECK) then return not c:IsSetCard(0x4552) if c:IsLocation(LOCATION_HAND+LOCATION_DECK) then return not c:IsSetCard(0x6552)
else return false else return false
end end
end end
...@@ -100,7 +100,7 @@ function rsnm.thcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -100,7 +100,7 @@ function rsnm.thcon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and e:GetHandler():GetPreviousControler()==tp return rp==1-tp and e:GetHandler():GetPreviousControler()==tp
end end
function rsnm.thfilter(c) function rsnm.thfilter(c)
return c:IsAbleToHand() and c:IsSetCard(0x4552) return c:IsAbleToHand() and c:IsSetCard(0x6552)
end end
function rsnm.thop(e,tp) function rsnm.thop(e,tp)
rshint.Select(tp,"th") rshint.Select(tp,"th")
...@@ -157,7 +157,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp) ...@@ -157,7 +157,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
local c=aux.ExceptThisCard(e) local c=aux.ExceptThisCard(e)
if not c then return end if not c then return end
local tc=e:GetLabelObject() local tc=e:GetLabelObject()
if not tc:IsSetCard(0x4552) then return end if not tc:IsSetCard(0x6552) then return end
local e1=rsef.SV_IMMUNE_EFFECT(c,cm.val,nil,rsreset.est_pend) local e1=rsef.SV_IMMUNE_EFFECT(c,cm.val,nil,rsreset.est_pend)
e1:SetOwnerPlayer(tp) e1:SetOwnerPlayer(tp)
local te=tc.flip_effect local te=tc.flip_effect
...@@ -175,7 +175,7 @@ function cm.poscon(e,tp,eg,ep,ev,re,r,rp) ...@@ -175,7 +175,7 @@ function cm.poscon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker():IsControler(1-tp) return Duel.GetAttacker():IsControler(1-tp)
end end
function cm.posfilter(c) function cm.posfilter(c)
return c:IsFaceup() and c:IsSetCard(0x4552) return c:IsFaceup() and c:IsSetCard(0x6552)
end end
function cm.posop(e,tp) function cm.posop(e,tp)
local g=Duel.GetMatchingGroup(cm.posfilter,tp,LOCATION_MZONE,0,nil) local g=Duel.GetMatchingGroup(cm.posfilter,tp,LOCATION_MZONE,0,nil)
......
...@@ -7,7 +7,7 @@ function cm.initial_effect(c) ...@@ -7,7 +7,7 @@ function cm.initial_effect(c)
local e4=rsnm.FilpFun(c,m,"sp",nil,rsop.target(cm.spfilter,"sp",LOCATION_HAND+LOCATION_GRAVE ),cm.op,true) local e4=rsnm.FilpFun(c,m,"sp",nil,rsop.target(cm.spfilter,"sp",LOCATION_HAND+LOCATION_GRAVE ),cm.op,true)
end end
function cm.spfilter(c,e,tp) function cm.spfilter(c,e,tp)
return c:IsSetCard(0x4552) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 return c:IsSetCard(0x6552) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
end end
function cm.op(e,tp) function cm.op(e,tp)
rshint.Select(tp,"sp") rshint.Select(tp,"sp")
......
...@@ -34,7 +34,7 @@ function cm.resfilter(c,e,tp) ...@@ -34,7 +34,7 @@ function cm.resfilter(c,e,tp)
return c:IsReleasable() and c:IsFaceup() and Duel.GetMZoneCount(tp,c,tp)>0 return c:IsReleasable() and c:IsFaceup() and Duel.GetMZoneCount(tp,c,tp)>0
end end
function cm.spfilter(c,e,tp) function cm.spfilter(c,e,tp)
return c:IsSetCard(0x4552) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) return c:IsSetCard(0x6552) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE)
end end
function cm.spop(e,tp) function cm.spop(e,tp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
......
...@@ -15,7 +15,7 @@ function cm.op(e,tp) ...@@ -15,7 +15,7 @@ function cm.op(e,tp)
local e1=rsef.FV_CANNOT_BE_TARGET({c,tp},"effect",aux.tgoval,aux.TargetBoolFunction(Card.IsFacedown),{LOCATION_MZONE,0},nil,rsreset.pend) local e1=rsef.FV_CANNOT_BE_TARGET({c,tp},"effect",aux.tgoval,aux.TargetBoolFunction(Card.IsFacedown),{LOCATION_MZONE,0},nil,rsreset.pend)
end end
function cm.spfilter(c,e,tp) function cm.spfilter(c,e,tp)
return c:IsSetCard(0x4552) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) and not c:IsCode(m) return c:IsSetCard(0x6552) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) and not c:IsCode(m)
end end
function cm.spop(e,tp) function cm.spop(e,tp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
......
...@@ -84,6 +84,7 @@ function cm.regop2(e,tp,eg,ep,ev,re,r,rp) ...@@ -84,6 +84,7 @@ function cm.regop2(e,tp,eg,ep,ev,re,r,rp)
end end
function cm.activate(e,tp,eg,ep,ev,re,r,rp) function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not Duel.IsExistingMatchingCard(Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,nil) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g1=Duel.SelectMatchingCard(tp,Card.IsAbleToChangeControler,tp,0,LOCATION_MZONE,1,1,nil) local g1=Duel.SelectMatchingCard(tp,Card.IsAbleToChangeControler,tp,0,LOCATION_MZONE,1,1,nil)
local tc1=g1:GetFirst() local tc1=g1:GetFirst()
......
...@@ -87,3 +87,24 @@ function Tenka.Asamiya(c) ...@@ -87,3 +87,24 @@ function Tenka.Asamiya(c)
e0:SetValue(81027000) e0:SetValue(81027000)
c:RegisterEffect(e0) c:RegisterEffect(e0)
end end
--
function Tenka.EightOne(c)
c:EnableReviveLimit()
aux.AddCodeList(c,81005036)
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e0:SetRange(LOCATION_MZONE)
e0:SetCode(EFFECT_IMMUNE_EFFECT)
e0:SetValue(Tenka.efilter)
c:RegisterEffect(e0)
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(aux.FALSE)
c:RegisterEffect(e1)
end
function Tenka.efilter(e,te)
return te:IsActiveType(TYPE_TRAP)
end
--葱喵的现实世界 --葱喵的现实世界
function c960005.initial_effect(c) function c960005.initial_effect(c)
--Activate --Activate
local e0=Effect.CreateEffect(c)
e0:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
e0:SetOperation(c960005.activate)
c:RegisterEffect(e0)
--disable
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetCategory(CATEGORY_SEARCH)
e1:SetCode(EFFECT_DISABLE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetRange(LOCATION_SZONE) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTargetRange(LOCATION_SZONE,LOCATION_SZONE) e1:SetOperation(c960005.activate)
e1:SetTarget(c960005.distarget)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--disable
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_DISABLE)
e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(LOCATION_FZONE,LOCATION_FZONE)
e2:SetTarget(c960005.distarget)
c:RegisterEffect(e2)
--disable effect --disable effect
local e7=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e7:SetCode(EVENT_CHAIN_SOLVING) e3:SetCode(EVENT_CHAIN_SOLVING)
e7:SetRange(LOCATION_SZONE) e3:SetRange(LOCATION_SZONE)
e7:SetOperation(c960005.disop) e3:SetOperation(c960005.disoperation)
c:RegisterEffect(e7) c:RegisterEffect(e3)
--maintain --maintain
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
...@@ -32,51 +32,38 @@ function c960005.initial_effect(c) ...@@ -32,51 +32,38 @@ function c960005.initial_effect(c)
e4:SetOperation(c960005.mtop) e4:SetOperation(c960005.mtop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
--reverse damage --reverse damage
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_REVERSE_DAMAGE)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,0)
e2:SetRange(LOCATION_SZONE)
e2:SetValue(1)
c:RegisterEffect(e1)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_REVERSE_RECOVER)
e1:SetRange(LOCATION_SZONE)
e1:SetTargetRange(0,1)
e1:SetValue(1)
c:RegisterEffect(e1)
--change lp
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(960005,0))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetCondition(c960005.lpcon)
e1:SetOperation(c960005.lpop)
c:RegisterEffect(e1)
--activate Zombie World
local e5=Effect.CreateEffect(c) local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(960005,0)) e5:SetType(EFFECT_TYPE_FIELD)
e5:SetType(EFFECT_TYPE_QUICK_O) e5:SetCode(EFFECT_REVERSE_DAMAGE)
e5:SetRange(LOCATION_SZONE+LOCATION_GRAVE) e5:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e5:SetCode(EVENT_FREE_CHAIN) e5:SetTargetRange(1,0)
e5:SetCountLimit(1,960005) e5:SetRange(LOCATION_SZONE)
e5:SetCost(aux.bfgcost) e5:SetValue(1)
e5:SetOperation(c960005.acop)
c:RegisterEffect(e5) c:RegisterEffect(e5)
end local e6=Effect.CreateEffect(c)
function c960005.activate(e,tp,eg,ep,ev,re,r,rp) e6:SetType(EFFECT_TYPE_FIELD)
Duel.Hint(HINT_MUSIC,0,aux.Stringid(960005,2)) e6:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e6:SetCode(EFFECT_REVERSE_RECOVER)
e6:SetRange(LOCATION_SZONE)
e6:SetTargetRange(0,1)
e6:SetValue(1)
c:RegisterEffect(e6)
--change lp
local e7=Effect.CreateEffect(c)
e7:SetDescription(aux.Stringid(960005,0))
e7:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e7:SetProperty(EFFECT_FLAG_DELAY)
e7:SetCode(EVENT_TO_GRAVE)
e7:SetCondition(c960005.lpcon)
e7:SetOperation(c960005.lpop)
c:RegisterEffect(e7)
end end
function c960005.distarget(e,c) function c960005.distarget(e,c)
return c:IsType(TYPE_FIELD) return c~=e:GetHandler() and c:IsType(TYPE_FIELD)
end end
function c960005.disop(e,tp,eg,ep,ev,re,r,rp) function c960005.disoperation(e,tp,eg,ep,ev,re,r,rp)
local tl=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION) local tl=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)
if (tl==LOCATION_GRAVE or t1==LOCATION_FZONE) and re:IsActiveType(TYPE_FIELD) then if bit.band(tl,LOCATION_FZONE+LOCATION_GRAVE)~=0 and re:IsType(TYPE_FIELD) then
Duel.NegateEffect(ev) Duel.NegateEffect(ev)
end end
end end
...@@ -88,13 +75,17 @@ function c960005.mtop(e,tp,eg,ep,ev,re,r,rp) ...@@ -88,13 +75,17 @@ function c960005.mtop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c960005.lpcon(e,tp,eg,ep,ev,re,r,rp) function c960005.lpcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetLP(tp)<=Duel.GetLP(1-tp)-4000 return Duel.GetLP(1-tp)-Duel.GetLP(tp)>=4000
end end
function c960005.lpop(e,tp,eg,ep,ev,re,r,rp) function c960005.lpop(e,tp,eg,ep,ev,re,r,rp)
Duel.SetLP(tp,1-tp,8000) Duel.SetLP(tp,8000)
Duel.SetLP(1-tp,8000)
end end
function c960005.filter(c,tp) function c960005.filter(c,tp)
return c:IsCode(960002) and c:GetActivateEffect() and c:GetActivateEffect():IsActivatable(tp,true,true) return c:IsCode(c960005) and c:GetActivateEffect() and c:GetActivateEffect():IsActivatable(tp,true,true)
end
function c960005.actg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c960005.filter,tp,LOCATION_GRAVE+LOCATION_DECK,0,1,nil,tp) end
end end
function c960005.acop(e,tp,eg,ep,ev,re,r,rp) function c960005.acop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
...@@ -110,7 +101,7 @@ function c960005.acop(e,tp,eg,ep,ev,re,r,rp) ...@@ -110,7 +101,7 @@ function c960005.acop(e,tp,eg,ep,ev,re,r,rp)
te:UseCountLimit(tp,1,true) te:UseCountLimit(tp,1,true)
local tep=tc:GetControler() local tep=tc:GetControler()
local cost=te:GetCost() local cost=te:GetCost()
if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end if cost then cost(te,te,eg,ep,ev,re,r,rp,1) end
Duel.RaiseEvent(tc,4179255,te,0,tp,tp,Duel.GetCurrentChain()) Duel.RaiseEvent(tc,960005,te,0,tp,tp,Duel.GetCurrentChain())
end end
end end
\ No newline at end of file
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