Commit 7f63a772 authored by JoyJ's avatar JoyJ

fix

parent 28fcfc4b
......@@ -4,7 +4,7 @@ function c20059999.initial_effect(c)
local e10=Effect.CreateEffect(c)
e10:SetType(EFFECT_TYPE_ACTIVATE)
e10:SetCode(EVENT_FREE_CHAIN)
e10:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_CANNOT_INACTIVATE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE)
e10:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_CANNOT_INACTIVATE+EFFECT_FLAG_CANNOT_DISABLE)
c:RegisterEffect(e10)
--cannot disable
local e11=Effect.CreateEffect(c)
......@@ -43,7 +43,7 @@ function c20059999.initial_effect(c)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_CHAINING)
e4:SetRange(LOCATION_HAND)
e4:SetProperty(EFFECT_FLAG_CANNOT_INACTIVATE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE)
e4:SetProperty(EFFECT_FLAG_CANNOT_INACTIVATE+EFFECT_FLAG_CANNOT_DISABLE)
e4:SetCost(c20059999.discost)
e4:SetTarget(c20059999.distg)
e4:SetOperation(c20059999.disop)
......
......@@ -33,7 +33,7 @@ function c30795251.initial_effect(c)
ge1:SetOperation(c30795251.checkop)
Duel.RegisterEffect(ge1,0)
if not c30795251.costcounter then c30795251.costcounter={} end
c30795251.costcounter[e:GetHandler()]=0
c30795251.costcounter[c]=0
end
function c30795251.reccon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_SZONE)
......
......@@ -6,7 +6,6 @@ function c56120263.initial_effect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetCondition(c56120263.condition)
e1:SetTarget(c56120263.target)
e1:SetOperation(c56120263.operation)
c:RegisterEffect(e1)
......
......@@ -27,7 +27,7 @@ function c66666004.init(e)
c66666004.active[tp+10] = true
Duel.Exile(g,REASON_RULE)
local top = Duel.GetDecktopGroup(tp,i)
top:ForEach(c66666004.exile)
for tc in aux.Next(g) do c66666004.exile(tc) end
Duel.Exile(top,REASON_RULE)
end
local g2 = Duel.GetMatchingGroup(Card.IsCode,tp,LOCATION_DECK,0,nil,66666004)
......
......@@ -27,7 +27,7 @@ function c66666005.init(e)
c66666005.active[tp+10] = true
Duel.Exile(g,REASON_RULE)
local top = Duel.GetDecktopGroup(tp,i)
top:ForEach(c66666005.exile)
for tc in aux.Next(g) do c66666005.exile(tc) end
Duel.Exile(top,REASON_RULE)
end
local g2 = Duel.GetMatchingGroup(Card.IsCode,tp,LOCATION_DECK,0,nil,66666005)
......
--[决斗编年史]森之番人 绿狒狒
function c46668237.initial_effect(c)
function c73286664.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(73286664,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetCondition(c73286664.condition)
e1:SetCost(c73286664.cost)
e1:SetTarget(c73286664.target)
e1:SetOperation(c73286664.operation)
c:RegisterEffect(e1)
end
function c73286664.cfilter(c,tp)
return c:IsType(TYPE_MONSTER) and c:IsRace(RACE_BEAST) and c:IsPreviousControler(tp) and c:IsPreviousPosition(POS_FACEUP)
and c:IsPreviousLocation(LOCATION_MZONE) and bit.band(c:GetPreviousRaceOnField(),RACE_BEAST)~=0
end
function c73286664.condition(e,tp,eg,ep,ev,re,r,rp)
return not eg:IsContains(e:GetHandler()) and eg:IsExists(c73286664.cfilter,1,nil,tp) and bit.band(r,REASON_DESTROY+REASON_EFFECT)==REASON_DESTROY+REASON_EFFECT
end
function c73286664.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,1000) end
Duel.PayLPCost(tp,1000)
end
function c73286664.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c73286664.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
--非常食
function c80464035.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_RECOVER)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c80464035.cost)
e1:SetTarget(c80464035.target)
e1:SetOperation(c80464035.activate)
c:RegisterEffect(e1)
end
function c80464035.costfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToGraveAsCost()
end
function c80464035.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c80464035.costfilter,tp,LOCATION_ONFIELD,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c80464035.costfilter,tp,LOCATION_ONFIELD,0,1,1,e:GetHandler())
Duel.SendtoGrave(g,REASON_COST)
e:SetLabel(g:GetCount())
end
function c80464035.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local ct=e:GetLabel()
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(ct*1000)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,ct*1000)
end
function c80464035.activate(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Recover(p,d,REASON_EFFECT)
end
--クリアー・ワールド
function c84600933.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--maintain
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(84600933,4))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetRange(LOCATION_FZONE)
e2:SetCountLimit(1)
e2:SetCondition(c84600933.mtcon)
e2:SetOperation(c84600933.mtop)
c:RegisterEffect(e2)
--light
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_PUBLIC)
e4:SetRange(LOCATION_FZONE)
e4:SetTargetRange(LOCATION_HAND,0)
e4:SetCondition(c84600933.lightcon1)
c:RegisterEffect(e4)
local e4_=e4:Clone()
e4_:SetTargetRange(0,LOCATION_HAND)
e4_:SetCondition(c84600933.lightcon2)
c:RegisterEffect(e4_)
--dark
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD)
e5:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE)
e5:SetRange(LOCATION_FZONE)
e5:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e5:SetTargetRange(1,0)
e5:SetCondition(c84600933.darkcon1)
c:RegisterEffect(e5)
local e6=e5:Clone()
e6:SetCondition(c84600933.darkcon2)
e6:SetTargetRange(0,1)
c:RegisterEffect(e6)
--earth
local e7=Effect.CreateEffect(c)
e7:SetDescription(aux.Stringid(84600933,1))
e7:SetCategory(CATEGORY_DESTROY)
e7:SetCode(EVENT_PHASE+PHASE_STANDBY)
e7:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e7:SetRange(LOCATION_FZONE)
e7:SetProperty(EFFECT_FLAG_CARD_TARGET)
e7:SetCountLimit(1)
e7:SetCondition(c84600933.descon)
e7:SetTarget(c84600933.destg)
e7:SetOperation(c84600933.desop)
c:RegisterEffect(e7)
--water
local e8=Effect.CreateEffect(c)
e8:SetDescription(aux.Stringid(84600933,2))
e8:SetCategory(CATEGORY_HANDES)
e8:SetCode(EVENT_PHASE+PHASE_END)
e8:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e8:SetRange(LOCATION_FZONE)
e8:SetCountLimit(1)
e8:SetCondition(c84600933.hdcon)
e8:SetTarget(c84600933.hdtg)
e8:SetOperation(c84600933.hdop)
c:RegisterEffect(e8)
--fire
local e9=Effect.CreateEffect(c)
e9:SetDescription(aux.Stringid(84600933,3))
e9:SetCategory(CATEGORY_DAMAGE)
e9:SetCode(EVENT_PHASE+PHASE_END)
e9:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e9:SetRange(LOCATION_FZONE)
e9:SetCountLimit(1)
e9:SetCondition(c84600933.damcon)
e9:SetTarget(c84600933.damtg)
e9:SetOperation(c84600933.damop)
c:RegisterEffect(e9)
--wind
local e10=Effect.CreateEffect(c)
e10:SetType(EFFECT_TYPE_FIELD)
e10:SetCode(EFFECT_ACTIVATE_COST)
e10:SetRange(LOCATION_FZONE)
e10:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e10:SetTargetRange(1,0)
e10:SetTarget(c84600933.actarget)
e10:SetCondition(c84600933.windcon1)
e10:SetCost(c84600933.costchk)
e10:SetOperation(c84600933.costop)
c:RegisterEffect(e10)
local e11=e10:Clone()
e11:SetTargetRange(0,1)
e11:SetCondition(c84600933.windcon2)
c:RegisterEffect(e11)
end
function c84600933.mtcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c84600933.mtop(e,tp,eg,ep,ev,re,r,rp)
if Duel.CheckLPCost(tp,500) and Duel.SelectYesNo(tp,aux.Stringid(84600933,0)) then
Duel.PayLPCost(tp,500)
else
Duel.Destroy(e:GetHandler(),REASON_COST)
end
end
function c84600933.attributechk(tp)
local attchk=0
if Duel.IsPlayerAffectedByEffect(tp,97811903) then
attchk=0
elseif Duel.IsPlayerAffectedByEffect(tp,6089145) then
attchk=ATTRIBUTE_LIGHT|ATTRIBUTE_DARK|ATTRIBUTE_EARTH|ATTRIBUTE_WATER|ATTRIBUTE_FIRE|ATTRIBUTE_WIND
else
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil)
local tc=g:GetFirst()
while tc do
attchk=attchk|tc:GetAttribute()
tc=g:GetNext()
end
end
return attchk
end
function c84600933.lightcon1(e)
local tp=e:GetHandlerPlayer()
return c84600933.attributechk(tp)&ATTRIBUTE_LIGHT~=0
end
function c84600933.lightcon2(e)
local tp=e:GetHandlerPlayer()
return c84600933.attributechk(1-tp)&ATTRIBUTE_LIGHT~=0
end
function c84600933.darkcon1(e)
local tp=e:GetHandlerPlayer()
return c84600933.attributechk(tp)&ATTRIBUTE_DARK~=0
and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)>=2
end
function c84600933.darkcon2(e)
local tp=e:GetHandlerPlayer()
return c84600933.attributechk(1-tp)&ATTRIBUTE_DARK~=0
and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>=2
end
function c84600933.descon(e,tp,eg,ep,ev,re,r,rp)
return c84600933.attributechk(Duel.GetTurnPlayer())&ATTRIBUTE_EARTH~=0
end
function c84600933.desfilter(c)
return c:IsPosition(POS_FACEUP_DEFENSE)
end
function c84600933.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local turnp=Duel.GetTurnPlayer()
if chk==0 then return Duel.IsExistingMatchingCard(c84600933.desfilter,turnp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_OPSELECTED,1-turnp,aux.Stringid(84600933,1))
end
function c84600933.desop(e,tp,eg,ep,ev,re,r,rp)
local turnp=Duel.GetTurnPlayer()
Duel.Hint(HINT_SELECTMSG,turnp,HINTMSG_DESTROY)
local tg=Duel.SelectMatchingCard(turnp,c84600933.desfilter,turnp,LOCATION_MZONE,0,1,1,nil)
Duel.HintSelection(tg)
Duel.Destroy(tg,REASON_EFFECT)
end
function c84600933.hdcon(e,tp,eg,ep,ev,re,r,rp)
return c84600933.attributechk(Duel.GetTurnPlayer())&ATTRIBUTE_WATER~=0
end
function c84600933.hdtg(e,tp,eg,ep,ev,re,r,rp,chk)
local turnp=Duel.GetTurnPlayer()
if chk==0 then return Duel.GetFieldGroupCount(turnp,LOCATION_HAND,0)>0 end
Duel.Hint(HINT_OPSELECTED,1-turnp,aux.Stringid(84600933,2))
end
function c84600933.hdop(e,tp,eg,ep,ev,re,r,rp)
local turnp=Duel.GetTurnPlayer()
Duel.DiscardHand(turnp,nil,1,1,REASON_EFFECT+REASON_DISCARD)
end
function c84600933.damcon(e,tp,eg,ep,ev,re,r,rp)
return c84600933.attributechk(Duel.GetTurnPlayer())&ATTRIBUTE_FIRE~=0
end
function c84600933.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local turnp=Duel.GetTurnPlayer()
Duel.Hint(HINT_OPSELECTED,1-turnp,aux.Stringid(84600933,3))
end
function c84600933.damop(e,tp,eg,ep,ev,re,r,rp)
local turnp=Duel.GetTurnPlayer()
Duel.Damage(turnp,1000,REASON_EFFECT)
end
function c84600933.windcon1(e)
local tp=e:GetHandlerPlayer()
return bit.band(c84600933.attributechk(tp),ATTRIBUTE_WIND)~=0
end
function c84600933.windcon2(e)
local tp=e:GetHandlerPlayer()
return bit.band(c84600933.attributechk(1-tp),ATTRIBUTE_WIND)~=0
end
function c84600933.actarget(e,te,tp)
return te:IsHasType(EFFECT_TYPE_ACTIVATE) and te:IsActiveType(TYPE_SPELL)
end
function c84600933.costchk(e,te_or_c,tp)
return Duel.CheckLPCost(tp,500)
end
function c84600933.costop(e,tp,eg,ep,ev,re,r,rp)
Duel.PayLPCost(tp,500)
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment