Commit 3886ec1a authored by mercury233's avatar mercury233

fix

parent ed6c6a13
...@@ -32,7 +32,7 @@ function s.filter(c,tp) ...@@ -32,7 +32,7 @@ function s.filter(c,tp)
return c:IsType(TYPE_FUSION) and Duel.IsExistingMatchingCard(s.sfilter,tp,LOCATION_DECK,0,1,nil,c) return c:IsType(TYPE_FUSION) and Duel.IsExistingMatchingCard(s.sfilter,tp,LOCATION_DECK,0,1,nil,c)
end end
function s.sfilter(c,tc) function s.sfilter(c,tc)
return aux.IsMaterialListCode(tc,c:GetCode()) return aux.IsMaterialListCode(tc,c:GetCode()) and c:IsAbleToGrave()
end end
function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_EXTRA,0,1,nil,tp) end if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_EXTRA,0,1,nil,tp) end
......
...@@ -8,6 +8,7 @@ function s.initial_effect(c) ...@@ -8,6 +8,7 @@ function s.initial_effect(c)
e1:SetDescription(aux.Stringid(id,0)) e1:SetDescription(aux.Stringid(id,0))
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e1:SetCondition(s.condition) e1:SetCondition(s.condition)
e1:SetTarget(s.target) e1:SetTarget(s.target)
c:RegisterEffect(e1) c:RegisterEffect(e1)
......
...@@ -33,7 +33,7 @@ function c100207002.initial_effect(c) ...@@ -33,7 +33,7 @@ function c100207002.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c100207002.filter(c) function c100207002.filter(c)
return not c:IsAttribute(ATTRIBUTE_WIND) and c:IsFaceup() return c:GetAttribute()~=ATTRIBUTE_WIND and c:IsFaceup()
end end
function c100207002.atcon(e) function c100207002.atcon(e)
local tp=e:GetHandlerPlayer() local tp=e:GetHandlerPlayer()
...@@ -42,7 +42,7 @@ function c100207002.atcon(e) ...@@ -42,7 +42,7 @@ function c100207002.atcon(e)
end end
function c100207002.atlimit(e,c) function c100207002.atlimit(e,c)
local tp=e:GetHandlerPlayer() local tp=e:GetHandlerPlayer()
return not c:IsAttribute(ATTRIBUTE_WIND) and c:IsControler(1-tp) and not c:IsImmuneToEffect(e) return c:GetAttribute()~=ATTRIBUTE_WIND and c:IsControler(1-tp) and not c:IsImmuneToEffect(e)
end end
function c100207002.thfilter(c) function c100207002.thfilter(c)
return c:IsCode(24094653) and c:IsAbleToHand() return c:IsCode(24094653) and c:IsAbleToHand()
......
...@@ -47,7 +47,14 @@ end ...@@ -47,7 +47,14 @@ end
function c100207003.op(e,tp,eg,ep,ev,re,r,rp) function c100207003.op(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c100207003.pfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,tp):GetFirst() local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c100207003.pfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,tp):GetFirst()
if tc then Duel.MoveToField(tc,tp,tp,LOCATION_FZONE,POS_FACEUP,true) end if tc then
local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0)
if fc then
Duel.SendtoGrave(fc,REASON_RULE)
Duel.BreakEffect()
end
Duel.MoveToField(tc,tp,tp,LOCATION_FZONE,POS_FACEUP,true)
end
end end
function c100207003.pcon(e,tp,eg,ep,ev,re,r,rp) function c100207003.pcon(e,tp,eg,ep,ev,re,r,rp)
local ec=e:GetHandler() local ec=e:GetHandler()
......
...@@ -45,8 +45,10 @@ end ...@@ -45,8 +45,10 @@ end
function s.thop(e,tp,eg,ep,ev,re,r,rp) function s.thop(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,aux.NecroValleyFilter(s.filter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
end
end end
function s.cointg(e,tp,eg,ep,ev,re,r,rp,chk) function s.cointg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
......
...@@ -24,6 +24,8 @@ end ...@@ -24,6 +24,8 @@ end
function s.activate(e,tp,eg,ep,ev,re,r,rp) function s.activate(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,s.filter,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
end
end end
...@@ -10,6 +10,7 @@ function s.initial_effect(c) ...@@ -10,6 +10,7 @@ function s.initial_effect(c)
--indestructible --indestructible
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_INDESTRUCTABLE_COUNT) e1:SetCode(EFFECT_INDESTRUCTABLE_COUNT)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetValue(s.indct) e1:SetValue(s.indct)
...@@ -19,10 +20,11 @@ function s.initial_effect(c) ...@@ -19,10 +20,11 @@ function s.initial_effect(c)
e2:SetDescription(aux.Stringid(id,0)) e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_COUNTER) e2:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_COUNTER)
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1) e2:SetCountLimit(1)
e2:SetHintTiming(0,TIMING_BATTLE_START) e2:SetHintTiming(0,TIMING_BATTLE_START+TIMING_DAMAGE_STEP)
e2:SetCondition(s.ctcon) e2:SetCondition(s.ctcon)
e2:SetCost(s.ctcost) e2:SetCost(s.ctcost)
e2:SetTarget(s.cttg) e2:SetTarget(s.cttg)
...@@ -52,10 +54,12 @@ function s.indct(e,re,r,rp) ...@@ -52,10 +54,12 @@ function s.indct(e,re,r,rp)
else return 0 end else return 0 end
end end
function s.ctcon(e,tp,eg,ep,ev,re,r,rp) function s.ctcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp and (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE) return Duel.GetTurnPlayer()~=tp and aux.dscon()
and (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE)
end end
function s.ctcost(e,tp,eg,ep,ev,re,r,rp,chk) function s.ctcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end if chk==0 then return c:IsCanAddCounter(0x167,1)
and Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end end
function s.cttg(e,tp,eg,ep,ev,re,r,rp,chk) function s.cttg(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -9,7 +9,7 @@ function s.initial_effect(c) ...@@ -9,7 +9,7 @@ function s.initial_effect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS) e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,id) e1:SetCountLimit(1,id)
e1:SetTarget(s.target) e1:SetTarget(s.target)
e1:SetOperation(s.operation) e1:SetOperation(s.operation)
...@@ -25,6 +25,7 @@ function s.initial_effect(c) ...@@ -25,6 +25,7 @@ function s.initial_effect(c)
e4:SetCategory(CATEGORY_DAMAGE) e4:SetCategory(CATEGORY_DAMAGE)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e4:SetCode(EVENT_DESTROYED) e4:SetCode(EVENT_DESTROYED)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetCondition(s.damcon) e4:SetCondition(s.damcon)
e4:SetTarget(s.damtg) e4:SetTarget(s.damtg)
e4:SetOperation(s.damop) e4:SetOperation(s.damop)
...@@ -61,5 +62,6 @@ function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -61,5 +62,6 @@ function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,2000) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,2000)
end end
function s.damop(e,tp,eg,ep,ev,re,r,rp) function s.damop(e,tp,eg,ep,ev,re,r,rp)
Duel.Damage(tp,2000,REASON_EFFECT) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Damage(p,d,REASON_EFFECT)
end end
...@@ -9,7 +9,7 @@ function s.initial_effect(c) ...@@ -9,7 +9,7 @@ function s.initial_effect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS) e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,id) e1:SetCountLimit(1,id)
e1:SetTarget(s.target) e1:SetTarget(s.target)
e1:SetOperation(s.operation) e1:SetOperation(s.operation)
...@@ -25,6 +25,7 @@ function s.initial_effect(c) ...@@ -25,6 +25,7 @@ function s.initial_effect(c)
e4:SetCategory(CATEGORY_DAMAGE) e4:SetCategory(CATEGORY_DAMAGE)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e4:SetCode(EVENT_DESTROYED) e4:SetCode(EVENT_DESTROYED)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetCondition(s.damcon) e4:SetCondition(s.damcon)
e4:SetTarget(s.damtg) e4:SetTarget(s.damtg)
e4:SetOperation(s.damop) e4:SetOperation(s.damop)
...@@ -44,8 +45,10 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -44,8 +45,10 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
end end
if e:GetHandler():IsPosition(POS_FACEUP_ATTACK) then local c=e:GetHandler()
Duel.ChangePosition(e:GetHandler(),POS_FACEUP_DEFENSE) if c:IsRelateToChain() and c:IsPosition(POS_FACEUP_ATTACK) then
Duel.BreakEffect()
Duel.ChangePosition(c,POS_FACEUP_DEFENSE)
end end
end end
function s.damcon(e,tp,eg,ep,ev,re,r,rp) function s.damcon(e,tp,eg,ep,ev,re,r,rp)
...@@ -59,5 +62,6 @@ function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -59,5 +62,6 @@ function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,1000) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,1000)
end end
function s.damop(e,tp,eg,ep,ev,re,r,rp) function s.damop(e,tp,eg,ep,ev,re,r,rp)
Duel.Damage(tp,1000,REASON_EFFECT) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Damage(p,d,REASON_EFFECT)
end end
\ No newline at end of file
...@@ -42,8 +42,8 @@ function s.destarget(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -42,8 +42,8 @@ function s.destarget(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function s.desop(e,tp,eg,ep,ev,re,r,rp) function s.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,aux.ExceptThisCard(e)) local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,aux.ExceptThisCard(e))
Duel.Destroy(g,REASON_EFFECT)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.Destroy(g,REASON_EFFECT) then
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
...@@ -52,13 +52,12 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -52,13 +52,12 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp)
e1:SetValue(s.val) e1:SetValue(s.val)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
end
end end
function s.val(e,re,ev,r,rp,rc) function s.val(e,re,ev,r,rp,rc)
return bit.band(r,REASON_EFFECT)~=0 return bit.band(r,REASON_EFFECT)~=0
end end
function s.tdfilter(c,e) function s.tdfilter(c,e)
return c:IsFaceup() and c:IsCode(7903368,100207008,100207009) and c:IsAbleToDeck() and c:IsCanBeEffectTarget(e) return c:IsCode(7903368,100207008,100207009) and c:IsAbleToDeck() and c:IsCanBeEffectTarget(e)
end end
function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.tdfilter(chkc) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.tdfilter(chkc) end
......
...@@ -3,12 +3,12 @@ ...@@ -3,12 +3,12 @@
--Script by StupidStudiosN --Script by StupidStudiosN
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
Duel.EnableGlobalFlag(GLOBALFLAG_SELF_TOGRAVE)
c:EnableCounterPermit(0x168) c:EnableCounterPermit(0x168)
--Activate --Activate
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:SetHintTiming(0,TIMING_END_PHASE)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--untarget --untarget
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
...@@ -29,12 +29,12 @@ function s.initial_effect(c) ...@@ -29,12 +29,12 @@ function s.initial_effect(c)
e3:SetTarget(s.ntg) e3:SetTarget(s.ntg)
e3:SetOperation(s.nop) e3:SetOperation(s.nop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--destroy --to grave
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE) e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetRange(LOCATION_SZONE) e4:SetRange(LOCATION_SZONE)
e4:SetCode(EFFECT_SELF_DESTROY) e4:SetCode(EFFECT_SELF_TOGRAVE)
e4:SetCondition(s.sdcon) e4:SetCondition(s.sdcon)
c:RegisterEffect(e4) c:RegisterEffect(e4)
--inflict double damage --inflict double damage
...@@ -49,13 +49,13 @@ function s.initial_effect(c) ...@@ -49,13 +49,13 @@ function s.initial_effect(c)
c:RegisterEffect(e5) c:RegisterEffect(e5)
end end
function s.intg(e,c) function s.intg(e,c)
return c:IsFaceup() and c:GetBaseAttack()==0 and c:IsRace(RACE_DRAGON) return c:IsFaceup() and c:GetBaseAttack()==0 and c:IsRace(RACE_ROCK)
end end
function s.ncon(e,tp,eg,ep,ev,re,r,rp) function s.ncon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp and aux.bpcon() return Duel.GetTurnPlayer()~=tp
end end
function s.ntg(e,tp,eg,ep,ev,re,r,rp,chk) function s.ntg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return e:GetHandler():IsCanAddCounter(0x168,1) end
Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,1,0,0x168) Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,1,0,0x168)
end end
function s.nop(e,tp,eg,ep,ev,re,r,rp) function s.nop(e,tp,eg,ep,ev,re,r,rp)
...@@ -86,5 +86,7 @@ function s.ddop(e,tp,eg,ep,ev,re,r,rp) ...@@ -86,5 +86,7 @@ function s.ddop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
end end
function s.damval(e,re,val,r,rp,rc) function s.damval(e,re,val,r,rp,rc)
return math.floor(val*2) if r&REASON_EFFECT==REASON_EFFECT then
return val*2
else return val end
end end
\ No newline at end of file
...@@ -56,7 +56,9 @@ function s.atop(e,tp,eg,ep,ev,re,r,rp) ...@@ -56,7 +56,9 @@ function s.atop(e,tp,eg,ep,ev,re,r,rp)
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local g=Duel.GetFieldGroup(tp,0,LOCATION_GRAVE):Select(tp,1,1,nil) local g=Duel.GetFieldGroup(tp,0,LOCATION_GRAVE):Select(tp,1,1,nil)
if #g>0 then
Duel.Overlay(c,g) Duel.Overlay(c,g)
end
end end
function s.tgcon(e,tp,eg,ep,ev,re,r,rp) function s.tgcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ) return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
...@@ -68,6 +70,7 @@ function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -68,6 +70,7 @@ function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function s.tgop(e,tp,eg,ep,ev,re,r,rp) function s.tgop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,0,LOCATION_EXTRA) local g=Duel.GetFieldGroup(tp,0,LOCATION_EXTRA)
if #g==0 then return end
Duel.ConfirmCards(tp,g) Duel.ConfirmCards(tp,g)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg=g:FilterSelect(tp,Card.IsAbleToGrave,1,1,nil) local sg=g:FilterSelect(tp,Card.IsAbleToGrave,1,1,nil)
...@@ -96,7 +99,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -96,7 +99,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp)
if not tc:IsRelateToEffect(e) then return end if not tc:IsRelateToEffect(e) then return end
local atk=0 local atk=0
if tc:IsFaceup() then atk=tc:GetAttack() end if tc:IsFaceup() then atk=tc:GetAttack() end
if Duel.Destroy(tc,REASON_EFFECT)>0 and tc:IsPreviousLocation(LOCATION_MZONE) then if Duel.Destroy(tc,REASON_EFFECT)>0 and tc:IsPreviousLocation(LOCATION_MZONE) and atk>0 then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Damage(1-tp,atk//2,REASON_EFFECT) Duel.Damage(1-tp,atk//2,REASON_EFFECT)
end end
......
...@@ -17,8 +17,9 @@ function s.initial_effect(c) ...@@ -17,8 +17,9 @@ function s.initial_effect(c)
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_ANNOUNCE) e2:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(0,LOCATION_MZONE) e2:SetTargetRange(0,1)
e2:SetCondition(s.condition) e2:SetCondition(s.condition)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
...@@ -37,10 +38,9 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -37,10 +38,9 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
end end
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(id,1))
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT+EFFECT_FLAG_PLAYER_TARGET) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0) e1:SetTargetRange(1,0)
e1:SetTarget(aux.TargetBoolFunction(Card.IsNonAttribute,ATTRIBUTE_LIGHT)) e1:SetTarget(aux.TargetBoolFunction(Card.IsNonAttribute,ATTRIBUTE_LIGHT))
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
...@@ -50,5 +50,5 @@ function s.cfilter(c) ...@@ -50,5 +50,5 @@ function s.cfilter(c)
return c:IsFaceup() and c:IsCode(id) return c:IsFaceup() and c:IsCode(id)
end end
function s.condition(e,tp,eg,ep,ev,re,r,rp) function s.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_ONFIELD,0,1,nil) return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_ONFIELD,0,1,e:GetHandler())
end end
...@@ -10,7 +10,7 @@ function s.initial_effect(c) ...@@ -10,7 +10,7 @@ function s.initial_effect(c)
e1:SetCode(EFFECT_SPSUMMON_PROC) e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetRange(LOCATION_HAND) e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH) e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetCondition(s.spcon) e1:SetCondition(s.spcon)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--search --search
...@@ -46,8 +46,10 @@ end ...@@ -46,8 +46,10 @@ end
function s.thop(e,tp,eg,ep,ev,re,r,rp) function s.thop(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,s.filter,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
end
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_SPECIAL_SUMMON) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
......
...@@ -41,8 +41,10 @@ end ...@@ -41,8 +41,10 @@ end
function s.thop(e,tp,eg,ep,ev,re,r,rp) function s.thop(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,s.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
end
end end
function s.cfilter(c) function s.cfilter(c)
return c:IsFaceup() and c:IsLevelAbove(6) and c:IsSetCard(0x21) return c:IsFaceup() and c:IsLevelAbove(6) and c:IsSetCard(0x21)
......
...@@ -42,8 +42,10 @@ end ...@@ -42,8 +42,10 @@ end
function s.thop(e,tp,eg,ep,ev,re,r,rp) function s.thop(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,aux.NecroValleyFilter(s.filter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
end
end end
function s.cfilter(c,tp) function s.cfilter(c,tp)
return c:IsPreviousControler(tp) and c:IsSummonLocation(LOCATION_EXTRA) return c:IsPreviousControler(tp) and c:IsSummonLocation(LOCATION_EXTRA)
......
...@@ -13,8 +13,9 @@ function s.initial_effect(c) ...@@ -13,8 +13,9 @@ function s.initial_effect(c)
e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,id)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,id)
e1:SetHintTiming(0,TIMING_MAIN_END+TIMINGS_CHECK_MONSTER)
e1:SetCondition(s.rdcon) e1:SetCondition(s.rdcon)
e1:SetTarget(s.rdtg) e1:SetTarget(s.rdtg)
e1:SetOperation(s.rdop) e1:SetOperation(s.rdop)
...@@ -26,6 +27,7 @@ function s.initial_effect(c) ...@@ -26,6 +27,7 @@ function s.initial_effect(c)
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetHintTiming(0,TIMING_BATTLE_START+TIMING_BATTLE_END+TIMINGS_CHECK_MONSTER)
e2:SetCountLimit(1,id+o) e2:SetCountLimit(1,id+o)
e2:SetCondition(s.fscon) e2:SetCondition(s.fscon)
e2:SetTarget(s.fstg) e2:SetTarget(s.fstg)
......
...@@ -13,6 +13,7 @@ function s.initial_effect(c) ...@@ -13,6 +13,7 @@ function s.initial_effect(c)
e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCountLimit(1,id) e1:SetCountLimit(1,id)
e1:SetTarget(s.sptg) e1:SetTarget(s.sptg)
e1:SetOperation(s.spop) e1:SetOperation(s.spop)
...@@ -46,10 +47,9 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -46,10 +47,9 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
end end
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(id,2))
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT+EFFECT_FLAG_PLAYER_TARGET) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0) e1:SetTargetRange(1,0)
e1:SetTarget(s.limit) e1:SetTarget(s.limit)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
...@@ -78,8 +78,10 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -78,8 +78,10 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,LOCATION_ONFIELD):Select(tp,1,1,nil) local g=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,LOCATION_ONFIELD):Select(tp,1,1,nil)
Duel.HintSelection(g) Duel.HintSelection(g)
if Duel.Destroy(g,REASON_EFFECT)>0 then if Duel.Destroy(g,REASON_EFFECT)>0 then
Duel.BreakEffect()
local ct=Duel.GetMatchingGroup(s.dfilter,tp,LOCATION_GRAVE+LOCATION_MZONE,0,nil):GetClassCount(Card.GetCode) local ct=Duel.GetMatchingGroup(s.dfilter,tp,LOCATION_GRAVE+LOCATION_MZONE,0,nil):GetClassCount(Card.GetCode)
if ct>0 then
Duel.BreakEffect()
Duel.Damage(1-tp,ct*300,REASON_EFFECT) Duel.Damage(1-tp,ct*300,REASON_EFFECT)
end end
end
end end
...@@ -79,15 +79,17 @@ function s.dacost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -79,15 +79,17 @@ function s.dacost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoGrave(c,REASON_COST) Duel.SendtoGrave(c,REASON_COST)
end end
function s.daop(e,tp,eg,ep,ev,re,r,rp) function s.daop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_MZONE,0,1,nil)
for tc in aux.Next(g) do
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_EXTRA_ATTACK) e1:SetCode(EFFECT_EXTRA_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE) e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(s.datg)
e1:SetReset(RESET_PHASE+PHASE_BATTLE)
e1:SetValue(1) e1:SetValue(1)
tc:RegisterEffect(e1) Duel.RegisterEffect(e1,tp)
end end
function s.datg(e,c)
return c:IsRace(RACE_WARRIOR) or c:IsAttribute(ATTRIBUTE_FIRE)
end end
function s.thcon(e,tp,eg,ep,ev,re,r,rp) function s.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -14,6 +14,7 @@ function s.initial_effect(c) ...@@ -14,6 +14,7 @@ function s.initial_effect(c)
e2:SetRange(LOCATION_SZONE) e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(LOCATION_MZONE,0) e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(s.indestg) e2:SetTarget(s.indestg)
e2:SetValue(aux.indoval)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--zero atk --zero atk
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
...@@ -34,7 +35,7 @@ function s.initial_effect(c) ...@@ -34,7 +35,7 @@ function s.initial_effect(c)
e4:SetType(EFFECT_TYPE_QUICK_O) e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_CHAINING) e4:SetCode(EVENT_CHAINING)
e4:SetRange(LOCATION_GRAVE) e4:SetRange(LOCATION_GRAVE)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP) e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e4:SetCondition(s.negcon) e4:SetCondition(s.negcon)
e4:SetCost(aux.bfgcost) e4:SetCost(aux.bfgcost)
e4:SetTarget(s.negtg) e4:SetTarget(s.negtg)
......
...@@ -97,7 +97,7 @@ end ...@@ -97,7 +97,7 @@ end
function s.sfilter(c) function s.sfilter(c)
return c:IsType(TYPE_NORMAL) and c:IsAbleToDeck() return c:IsType(TYPE_NORMAL) and c:IsAbleToDeck()
end end
function s.ssptg(e,tp,eg,ep,ev,re,rp,chk) function s.ssptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.sfilter,tp,LOCATION_GRAVE,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(s.sfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_GRAVE)
end end
......
...@@ -100,6 +100,6 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -100,6 +100,6 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(ct*200) e1:SetValue(ct*200)
c:RegisterEffect(e1) tc:RegisterEffect(e1)
end end
end 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