Commit 096092f6 authored by wind2009's avatar wind2009

Merge remote-tracking branch 'upstream/ROTA' into master

parents 1147556c 2494a436
...@@ -77,4 +77,4 @@ function s.acop(e,tp,eg,ep,ev,re,r,rp) ...@@ -77,4 +77,4 @@ function s.acop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
end end
end end
\ No newline at end of file
...@@ -73,4 +73,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) ...@@ -73,4 +73,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp)
end end
function s.flipop(e,tp,eg,ep,ev,re,r,rp) function s.flipop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1) e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1)
end end
\ No newline at end of file
...@@ -72,4 +72,4 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp) ...@@ -72,4 +72,4 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
end end
end end
\ No newline at end of file
...@@ -98,4 +98,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -98,4 +98,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
g:Sub(sg) g:Sub(sg)
Duel.SendtoGrave(g,REASON_RULE) Duel.SendtoGrave(g,REASON_RULE)
end end
end end
\ No newline at end of file
...@@ -57,4 +57,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -57,4 +57,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
end end
end end
end end
end end
\ No newline at end of file
...@@ -89,4 +89,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -89,4 +89,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end end
end end
end end
\ No newline at end of file
...@@ -81,4 +81,4 @@ function s.effop(e,tp,eg,ep,ev,re,r,rp) ...@@ -81,4 +81,4 @@ function s.effop(e,tp,eg,ep,ev,re,r,rp)
rc:RegisterEffect(e2,true) rc:RegisterEffect(e2,true)
end end
rc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,3)) rc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,3))
end end
\ No newline at end of file
...@@ -92,4 +92,4 @@ end ...@@ -92,4 +92,4 @@ end
function s.drop(e,tp,eg,ep,ev,re,r,rp) function s.drop(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)
Duel.Draw(p,d,REASON_EFFECT) Duel.Draw(p,d,REASON_EFFECT)
end end
\ No newline at end of file
...@@ -64,4 +64,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) ...@@ -64,4 +64,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.BreakEffect() Duel.BreakEffect()
Duel.SendtoHand(rc,nil,REASON_EFFECT) Duel.SendtoHand(rc,nil,REASON_EFFECT)
end end
end end
\ No newline at end of file
...@@ -83,4 +83,4 @@ end ...@@ -83,4 +83,4 @@ end
function s.spop(e,tp,eg,ep,ev,re,r,rp) function s.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and aux.NecroValleyFilter()(tc) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end if tc:IsRelateToEffect(e) and aux.NecroValleyFilter()(tc) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end
end end
\ No newline at end of file
...@@ -87,4 +87,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -87,4 +87,4 @@ function s.thop(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
end end
\ No newline at end of file
...@@ -72,4 +72,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -72,4 +72,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
if c:IsRelateToEffect(e) then if c:IsRelateToEffect(e) then
if Duel.SpecialSummon(c,0,tp,1-tp,false,false,POS_FACEDOWN_DEFENSE)>0 then Duel.ConfirmCards(tp,c) end if Duel.SpecialSummon(c,0,tp,1-tp,false,false,POS_FACEDOWN_DEFENSE)>0 then Duel.ConfirmCards(tp,c) end
end end
end end
\ No newline at end of file
...@@ -77,4 +77,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -77,4 +77,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp)
if tc:IsRelateToEffect(e) and tc:IsType(TYPE_MONSTER) then if tc:IsRelateToEffect(e) and tc:IsType(TYPE_MONSTER) then
Duel.Destroy(tc,REASON_EFFECT) Duel.Destroy(tc,REASON_EFFECT)
end end
end end
\ No newline at end of file
...@@ -98,4 +98,4 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) ...@@ -98,4 +98,4 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp)
end end
function s.eqlimit(e,c) function s.eqlimit(e,c)
return c==e:GetLabelObject() return c==e:GetLabelObject()
end end
\ No newline at end of file
...@@ -71,4 +71,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -71,4 +71,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
if c:IsRelateToEffect(e) and aux.NecroValleyFilter()(c) then if c:IsRelateToEffect(e) and aux.NecroValleyFilter()(c) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end end
end end
\ No newline at end of file
...@@ -105,4 +105,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -105,4 +105,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc) Duel.ConfirmCards(1-tp,tc)
end end
end end
\ No newline at end of file
...@@ -68,4 +68,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -68,4 +68,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and tc:IsRelateToEffect(e) and aux.NecroValleyFilter()(tc) then and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and tc:IsRelateToEffect(e) and aux.NecroValleyFilter()(tc) 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
\ No newline at end of file
...@@ -96,4 +96,4 @@ end ...@@ -96,4 +96,4 @@ end
function s.setop(e,tp,eg,ep,ev,re,r,rp) function s.setop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) and aux.NecroValleyFilter()(c) then Duel.SSet(tp,c) end if c:IsRelateToEffect(e) and aux.NecroValleyFilter()(c) then Duel.SSet(tp,c) end
end end
\ No newline at end of file
...@@ -103,4 +103,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -103,4 +103,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp)
e1:SetValue(-atk) e1:SetValue(-atk)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
end end
end end
\ No newline at end of file
...@@ -75,4 +75,4 @@ function s.raceop(e,tp,eg,ep,ev,re,r,rp) ...@@ -75,4 +75,4 @@ function s.raceop(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END+RESET_OPPO_TURN) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
end end
\ No newline at end of file
...@@ -94,4 +94,4 @@ function s.chkcon(e) ...@@ -94,4 +94,4 @@ function s.chkcon(e)
end end
function s.eqlimit(e,c) function s.eqlimit(e,c)
return c==e:GetLabelObject() return c==e:GetLabelObject()
end end
\ No newline at end of file
...@@ -109,4 +109,4 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) ...@@ -109,4 +109,4 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp)
end end
function s.eqlimit(e,c) function s.eqlimit(e,c)
return c==e:GetOwner() return c==e:GetOwner()
end end
\ No newline at end of file
...@@ -63,4 +63,4 @@ end ...@@ -63,4 +63,4 @@ end
function s.desop(e,tp,eg,ep,ev,re,r,rp) function s.desop(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil) local sg=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
Duel.Destroy(sg,REASON_EFFECT) Duel.Destroy(sg,REASON_EFFECT)
end end
\ No newline at end of file
...@@ -82,4 +82,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -82,4 +82,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp)
e1:SetValue(1000) e1:SetValue(1000)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
end end
end end
\ No newline at end of file
...@@ -75,4 +75,4 @@ function s.value(e,c) ...@@ -75,4 +75,4 @@ function s.value(e,c)
local tc=e:GetHandler():GetEquipTarget() local tc=e:GetHandler():GetEquipTarget()
local g=tc:GetEquipGroup() local g=tc:GetEquipGroup()
return g:GetSum(Card.GetLink)*600 return g:GetSum(Card.GetLink)*600
end end
\ No newline at end of file
...@@ -104,4 +104,4 @@ function s.xyzop(e,tp,eg,ep,ev,re,r,rp) ...@@ -104,4 +104,4 @@ function s.xyzop(e,tp,eg,ep,ev,re,r,rp)
Duel.RaiseSingleEvent(oc,EVENT_DETACH_MATERIAL,e,0,0,0,0) Duel.RaiseSingleEvent(oc,EVENT_DETACH_MATERIAL,e,0,0,0,0)
Duel.RaiseEvent(oc,EVENT_DETACH_MATERIAL,e,0,0,0,0) Duel.RaiseEvent(oc,EVENT_DETACH_MATERIAL,e,0,0,0,0)
end end
end end
\ No newline at end of file
...@@ -91,4 +91,4 @@ function s.desrepop(e,tp,eg,ep,ev,re,r,rp) ...@@ -91,4 +91,4 @@ function s.desrepop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject() local tc=e:GetLabelObject()
tc:SetStatus(STATUS_DESTROY_CONFIRMED,false) tc:SetStatus(STATUS_DESTROY_CONFIRMED,false)
Duel.Destroy(tc,REASON_EFFECT+REASON_REPLACE) Duel.Destroy(tc,REASON_EFFECT+REASON_REPLACE)
end end
\ No newline at end of file
...@@ -65,4 +65,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -65,4 +65,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
end end
end end
\ No newline at end of file
...@@ -89,4 +89,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -89,4 +89,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp)
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT) Duel.Destroy(tc,REASON_EFFECT)
end end
end end
\ No newline at end of file
...@@ -50,4 +50,4 @@ function s.handcon(e) ...@@ -50,4 +50,4 @@ function s.handcon(e)
end end
function s.aclimit(e,re,tp) function s.aclimit(e,re,tp)
return re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsAttribute(ATTRIBUTE_LIGHT+ATTRIBUTE_EARTH+ATTRIBUTE_WIND) return re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsAttribute(ATTRIBUTE_LIGHT+ATTRIBUTE_EARTH+ATTRIBUTE_WIND)
end end
\ No newline at end of file
...@@ -87,4 +87,4 @@ function s.gcop(e,tp,eg,ep,ev,re,r,rp) ...@@ -87,4 +87,4 @@ function s.gcop(e,tp,eg,ep,ev,re,r,rp)
Duel.GetControl(g:GetFirst(),tp,PHASE_END,1) Duel.GetControl(g:GetFirst(),tp,PHASE_END,1)
end end
end end
end end
\ No newline at end of file
...@@ -107,4 +107,4 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp) ...@@ -107,4 +107,4 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp)
local d=Duel.GetFieldGroupCount(e:GetOwnerPlayer(),LOCATION_HAND,0)-(Duel.GetFieldGroupCount(e:GetOwnerPlayer(),0,LOCATION_ONFIELD)+6) local d=Duel.GetFieldGroupCount(e:GetOwnerPlayer(),LOCATION_HAND,0)-(Duel.GetFieldGroupCount(e:GetOwnerPlayer(),0,LOCATION_ONFIELD)+6)
local sg=g:RandomSelect(e:GetOwnerPlayer(),d) local sg=g:RandomSelect(e:GetOwnerPlayer(),d)
Duel.SendtoDeck(sg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) Duel.SendtoDeck(sg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end end
\ No newline at end of file
...@@ -85,4 +85,4 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) ...@@ -85,4 +85,4 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
end end
end end
\ No newline at end of file
...@@ -75,4 +75,4 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) ...@@ -75,4 +75,4 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.HintSelection(g) Duel.HintSelection(g)
Duel.SendtoGrave(g,REASON_EFFECT) Duel.SendtoGrave(g,REASON_EFFECT)
end end
end end
\ No newline at end of file
...@@ -67,4 +67,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -67,4 +67,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp)
if tg:GetCount()>0 then if tg:GetCount()>0 then
Duel.Destroy(tg,REASON_EFFECT) Duel.Destroy(tg,REASON_EFFECT)
end end
end end
\ No newline at end of file
...@@ -76,4 +76,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -76,4 +76,4 @@ function s.thop(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
end end
\ No newline at end of file
...@@ -52,4 +52,4 @@ end ...@@ -52,4 +52,4 @@ end
function s.atkval(e,c) function s.atkval(e,c)
local g=Duel.GetMatchingGroup(s.atkfilter,e:GetHandlerPlayer(),LOCATION_GRAVE,0,nil) local g=Duel.GetMatchingGroup(s.atkfilter,e:GetHandlerPlayer(),LOCATION_GRAVE,0,nil)
return g:GetSum(Card.GetLink)*400 return g:GetSum(Card.GetLink)*400
end end
\ No newline at end of file
...@@ -87,4 +87,4 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) ...@@ -87,4 +87,4 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp)
local pos=Duel.SelectPosition(tp,tc,POS_FACEUP) local pos=Duel.SelectPosition(tp,tc,POS_FACEUP)
Duel.ChangePosition(tc,pos) Duel.ChangePosition(tc,pos)
end end
end end
\ No newline at end of file
...@@ -81,4 +81,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -81,4 +81,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
end end
function s.splimit(e,c) function s.splimit(e,c)
return not c:IsAttribute(ATTRIBUTE_WATER) and c:IsLocation(LOCATION_EXTRA) return not c:IsAttribute(ATTRIBUTE_WATER) and c:IsLocation(LOCATION_EXTRA)
end end
\ No newline at end of file
...@@ -130,4 +130,4 @@ function s.tkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -130,4 +130,4 @@ function s.tkop(e,tp,eg,ep,ev,re,r,rp)
until count==0 until count==0
Duel.SpecialSummonComplete() Duel.SpecialSummonComplete()
end end
end end
\ No newline at end of file
...@@ -74,4 +74,4 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) ...@@ -74,4 +74,4 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp)
if tc then if tc then
Duel.SSet(tp,tc) Duel.SSet(tp,tc)
end end
end end
\ No newline at end of file
...@@ -94,4 +94,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -94,4 +94,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
if c:IsRelateToEffect(e) then if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end end
end end
\ No newline at end of file
...@@ -33,4 +33,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -33,4 +33,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.Destroy(g,REASON_EFFECT) Duel.Destroy(g,REASON_EFFECT)
end end
end end
\ No newline at end of file
...@@ -107,4 +107,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -107,4 +107,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
and c:IsRelateToEffect(e) and aux.NecroValleyFilter()(c) then and c:IsRelateToEffect(e) and aux.NecroValleyFilter()(c) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end end
end end
\ No newline at end of file
...@@ -87,4 +87,4 @@ function s.mtop(e,tp,eg,ep,ev,re,r,rp) ...@@ -87,4 +87,4 @@ function s.mtop(e,tp,eg,ep,ev,re,r,rp)
tc:CancelToGrave() tc:CancelToGrave()
Duel.Overlay(g:GetFirst(),Group.FromCards(tc)) Duel.Overlay(g:GetFirst(),Group.FromCards(tc))
end end
end end
\ No newline at end of file
...@@ -63,4 +63,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -63,4 +63,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
end end
function s.splimit(e,c) function s.splimit(e,c)
return not c:IsType(TYPE_XYZ) and c:IsLocation(LOCATION_EXTRA) return not c:IsType(TYPE_XYZ) and c:IsLocation(LOCATION_EXTRA)
end end
\ No newline at end of file
...@@ -87,4 +87,4 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) ...@@ -87,4 +87,4 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp)
e1:SetValue(LOCATION_REMOVED) e1:SetValue(LOCATION_REMOVED)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
end end
end end
\ No newline at end of file
...@@ -89,4 +89,4 @@ function s.xyzlv(e,c,rc) ...@@ -89,4 +89,4 @@ function s.xyzlv(e,c,rc)
else else
return c:GetLevel() return c:GetLevel()
end end
end end
\ No newline at end of file
...@@ -90,4 +90,4 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) ...@@ -90,4 +90,4 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp)
e1:SetValue(-1) e1:SetValue(-1)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
end end
end end
\ No newline at end of file
...@@ -106,4 +106,4 @@ end ...@@ -106,4 +106,4 @@ end
function s.aclimit(e,re,tp) function s.aclimit(e,re,tp)
local rc=re:GetHandler() local rc=re:GetHandler()
return re:IsActiveType(TYPE_MONSTER) and rc:IsSummonType(SUMMON_TYPE_SPECIAL) and rc:IsLocation(LOCATION_MZONE) return re:IsActiveType(TYPE_MONSTER) and rc:IsSummonType(SUMMON_TYPE_SPECIAL) and rc:IsLocation(LOCATION_MZONE)
end end
\ No newline at end of file
...@@ -61,19 +61,15 @@ function s.thfilter(c) ...@@ -61,19 +61,15 @@ function s.thfilter(c)
return c:IsFaceup() and c:IsSetCard(0x1b7) and c:IsAbleToHand() return c:IsFaceup() and c:IsSetCard(0x1b7) and c:IsAbleToHand()
end end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.thfilter(chkc) end if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and s.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(s.thfilter,tp,LOCATION_MZONE,0,1,nil) end if chk==0 then return Duel.IsExistingTarget(s.thfilter,tp,LOCATION_ONFIELD,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local ct=Duel.GetMatchingGroupCount(s.thfilter,tp,LOCATION_MZONE,0,nil) local g=Duel.SelectTarget(tp,s.thfilter,tp,LOCATION_ONFIELD,0,1,99,nil)
local g=Duel.SelectTarget(tp,s.thfilter,tp,LOCATION_MZONE,0,1,ct,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,#g,0,0) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,#g,0,0)
end end
function s.hfilter(c,e)
return c:IsRelateToEffect(e) and c:IsType(TYPE_MONSTER)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp) function s.thop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(s.hfilter,nil,e) local g=Duel.GetTargetsRelateToChain()
if #g>0 then if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
end end
end end
\ No newline at end of file
...@@ -87,4 +87,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -87,4 +87,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
if g:GetCount()>2 then if g:GetCount()>2 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end end
end end
\ No newline at end of file
...@@ -106,4 +106,4 @@ end ...@@ -106,4 +106,4 @@ end
function s.setop(e,tp,eg,ep,ev,re,r,rp) function s.setop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) and aux.NecroValleyFilter()(c) then Duel.SSet(tp,c) end if c:IsRelateToEffect(e) and aux.NecroValleyFilter()(c) then Duel.SSet(tp,c) end
end end
\ No newline at end of file
...@@ -83,4 +83,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -83,4 +83,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
end end
function s.splimit(e,c) function s.splimit(e,c)
return not c:IsRace(RACE_FIEND) and c:IsLocation(LOCATION_EXTRA) return not c:IsRace(RACE_FIEND) and c:IsLocation(LOCATION_EXTRA)
end end
\ No newline at end of file
...@@ -91,4 +91,4 @@ function s.tnop(e,tp,eg,ep,ev,re,r,rp) ...@@ -91,4 +91,4 @@ function s.tnop(e,tp,eg,ep,ev,re,r,rp)
end end
function s.tunerval(e,sc) function s.tunerval(e,sc)
return sc:IsControler(e:GetHandlerPlayer()) return sc:IsControler(e:GetHandlerPlayer())
end end
\ No newline at end of file
...@@ -101,4 +101,4 @@ function s.scop(e,tp,eg,ep,ev,re,r,rp) ...@@ -101,4 +101,4 @@ function s.scop(e,tp,eg,ep,ev,re,r,rp)
local msg=mg:SelectSubGroup(tp,s.exgselect,false,1,#mg,sc,c) local msg=mg:SelectSubGroup(tp,s.exgselect,false,1,#mg,sc,c)
Duel.XyzSummon(tp,sc,msg,#msg,#msg) Duel.XyzSummon(tp,sc,msg,#msg,#msg)
end end
end end
\ No newline at end of file
...@@ -119,4 +119,4 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) ...@@ -119,4 +119,4 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp)
Duel.HintSelection(tg) Duel.HintSelection(tg)
Duel.Equip(tp,ec,tg:GetFirst()) Duel.Equip(tp,ec,tg:GetFirst())
end end
end end
\ No newline at end of file
...@@ -99,4 +99,4 @@ function s.dreptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -99,4 +99,4 @@ function s.dreptg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function s.drepop(e,tp,eg,ep,ev,re,r,rp) function s.drepop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_EFFECT) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_EFFECT)
end end
\ No newline at end of file
...@@ -99,4 +99,4 @@ function s.thop2(e,tp,eg,ep,ev,re,r,rp) ...@@ -99,4 +99,4 @@ function s.thop2(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
end end
\ No newline at end of file
...@@ -96,4 +96,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -96,4 +96,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end end
end end
\ No newline at end of file
...@@ -98,4 +98,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) ...@@ -98,4 +98,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp)
local dam=Duel.GetMatchingGroupCount(s.damfilter,tp,LOCATION_REMOVED,0,nil)*100 local dam=Duel.GetMatchingGroupCount(s.damfilter,tp,LOCATION_REMOVED,0,nil)*100
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
Duel.Damage(p,dam,REASON_EFFECT) Duel.Damage(p,dam,REASON_EFFECT)
end end
\ No newline at end of file
...@@ -70,4 +70,4 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) ...@@ -70,4 +70,4 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
end end
end end
\ No newline at end of file
...@@ -87,4 +87,4 @@ function s.thop2(e,tp,eg,ep,ev,re,r,rp) ...@@ -87,4 +87,4 @@ function s.thop2(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
end end
\ No newline at end of file
...@@ -98,4 +98,4 @@ function s.regcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -98,4 +98,4 @@ function s.regcon(e,tp,eg,ep,ev,re,r,rp)
end end
function s.regop1(e,tp,eg,ep,ev,re,r,rp) function s.regop1(e,tp,eg,ep,ev,re,r,rp)
e:GetLabelObject():SetLabel(ev) e:GetLabelObject():SetLabel(ev)
end end
\ No newline at end of file
...@@ -76,4 +76,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) ...@@ -76,4 +76,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp)
e4:SetCode(EFFECT_SET_DEFENSE_FINAL) e4:SetCode(EFFECT_SET_DEFENSE_FINAL)
tc:RegisterEffect(e4) tc:RegisterEffect(e4)
end end
end end
\ No newline at end of file
...@@ -74,4 +74,4 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) ...@@ -74,4 +74,4 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp)
Duel.SSet(tp,c) Duel.SSet(tp,c)
end end
end end
end end
\ No newline at end of file
...@@ -66,4 +66,4 @@ function s.cop(e,tp,eg,ep,ev,re,r,rp) ...@@ -66,4 +66,4 @@ function s.cop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
end end
end end
\ No newline at end of file
...@@ -75,4 +75,4 @@ function s.attop(e,tp,eg,ep,ev,re,r,rp) ...@@ -75,4 +75,4 @@ function s.attop(e,tp,eg,ep,ev,re,r,rp)
end end
function s.valcon(e,re,r,rp) function s.valcon(e,re,r,rp)
return bit.band(r,REASON_EFFECT)~=0 return bit.band(r,REASON_EFFECT)~=0
end end
\ No newline at end of file
...@@ -81,4 +81,4 @@ function s.effop(e,tp,eg,ep,ev,re,r,rp) ...@@ -81,4 +81,4 @@ function s.effop(e,tp,eg,ep,ev,re,r,rp)
rc:RegisterEffect(e2,true) rc:RegisterEffect(e2,true)
end end
rc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,3)) rc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,3))
end end
\ No newline at end of file
...@@ -81,4 +81,4 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) ...@@ -81,4 +81,4 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp)
Duel.HintSelection(g) Duel.HintSelection(g)
Duel.Damage(1-tp,tc:GetBaseAttack(),REASON_EFFECT) Duel.Damage(1-tp,tc:GetBaseAttack(),REASON_EFFECT)
end end
end end
\ No newline at end of file
...@@ -201,4 +201,4 @@ function s.xyzop(e,tp,eg,ep,ev,re,r,rp) ...@@ -201,4 +201,4 @@ function s.xyzop(e,tp,eg,ep,ev,re,r,rp)
tc:CancelToGrave() tc:CancelToGrave()
Duel.Overlay(c,Group.FromCards(tc)) Duel.Overlay(c,Group.FromCards(tc))
end end
end end
\ No newline at end of file
...@@ -113,4 +113,4 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp) ...@@ -113,4 +113,4 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp)
Duel.BreakEffect() Duel.BreakEffect()
local g2=Duel.GetMatchingGroup(s.rmfilter1,tp,0,LOCATION_MZONE,nil) local g2=Duel.GetMatchingGroup(s.rmfilter1,tp,0,LOCATION_MZONE,nil)
Duel.Remove(g2,POS_FACEUP,REASON_EFFECT) Duel.Remove(g2,POS_FACEUP,REASON_EFFECT)
end end
\ No newline at end of file
...@@ -81,4 +81,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -81,4 +81,4 @@ function s.thop(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
end end
\ No newline at end of file
...@@ -81,4 +81,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -81,4 +81,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end end
\ No newline at end of file
...@@ -78,4 +78,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -78,4 +78,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoDeck(sg,nil,SEQ_DECKBOTTOM,REASON_EFFECT) Duel.SendtoDeck(sg,nil,SEQ_DECKBOTTOM,REASON_EFFECT)
end end
end end
end end
\ No newline at end of file
...@@ -84,4 +84,4 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp) ...@@ -84,4 +84,4 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end end
end end
\ No newline at end of file
...@@ -39,4 +39,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -39,4 +39,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(g,REASON_EFFECT) Duel.Destroy(g,REASON_EFFECT)
end end
end end
end end
\ No newline at end of file
...@@ -99,4 +99,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -99,4 +99,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp)
if g:GetCount()>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)~=0 then if g:GetCount()>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)~=0 then
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
end end
end end
\ No newline at end of file
...@@ -90,4 +90,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -90,4 +90,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
if c:IsRelateToEffect(e) and aux.NecroValleyFilter()(c) then if c:IsRelateToEffect(e) and aux.NecroValleyFilter()(c) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end end
end end
\ No newline at end of file
...@@ -80,4 +80,4 @@ function s.atkop(e,tp,ep,ev,re,r,rp) ...@@ -80,4 +80,4 @@ function s.atkop(e,tp,ep,ev,re,r,rp)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
d:RegisterEffect(e1) d:RegisterEffect(e1)
end end
end end
\ No newline at end of file
...@@ -53,4 +53,4 @@ function s.reop(e,tp,eg,ep,ev,re,r,rp) ...@@ -53,4 +53,4 @@ function s.reop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
end end
end end
\ No newline at end of file
...@@ -82,4 +82,4 @@ function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -82,4 +82,4 @@ function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function s.negop(e,tp,eg,ep,ev,re,r,rp) function s.negop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateActivation(ev) Duel.NegateActivation(ev)
end end
\ No newline at end of file
...@@ -93,4 +93,4 @@ function s.tgval(e,re,rp) ...@@ -93,4 +93,4 @@ function s.tgval(e,re,rp)
end end
function s.efilter(e,re) function s.efilter(e,re)
return re:IsActiveType(TYPE_MONSTER+TYPE_SPELL) return re:IsActiveType(TYPE_MONSTER+TYPE_SPELL)
end end
\ No newline at end of file
...@@ -92,4 +92,4 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) ...@@ -92,4 +92,4 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT) Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end end
end end
end end
\ No newline at end of file
...@@ -161,4 +161,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) ...@@ -161,4 +161,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp)
if c:IsRelateToEffect(e) and aux.NecroValleyFilter()(c) then if c:IsRelateToEffect(e) and aux.NecroValleyFilter()(c) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end end
end end
\ No newline at end of file
...@@ -69,4 +69,4 @@ function s.scop(e,tp,eg,ep,ev,re,r,rp) ...@@ -69,4 +69,4 @@ function s.scop(e,tp,eg,ep,ev,re,r,rp)
local sg=g:Select(tp,1,1,nil) local sg=g:Select(tp,1,1,nil)
Duel.SynchroSummon(tp,sg:GetFirst(),c) Duel.SynchroSummon(tp,sg:GetFirst(),c)
end end
end end
\ No newline at end of file
...@@ -100,4 +100,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -100,4 +100,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end end
end end
end end
\ No newline at end of file
...@@ -99,4 +99,4 @@ function s.tsop(e,tp,eg,ep,ev,re,r,rp) ...@@ -99,4 +99,4 @@ function s.tsop(e,tp,eg,ep,ev,re,r,rp)
end end
function s.eqlimit(e,c) function s.eqlimit(e,c)
return c==e:GetLabelObject() return c==e:GetLabelObject()
end end
\ No newline at end of file
...@@ -62,4 +62,4 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) ...@@ -62,4 +62,4 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp)
if tc:IsRelateToEffect(e) and tc:IsType(TYPE_MONSTER) then if tc:IsRelateToEffect(e) and tc:IsType(TYPE_MONSTER) then
Duel.ChangePosition(tc,POS_FACEUP_ATTACK) Duel.ChangePosition(tc,POS_FACEUP_ATTACK)
end end
end end
\ No newline at end of file
...@@ -85,4 +85,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -85,4 +85,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp)
and c:IsRelateToEffect(e) then and c:IsRelateToEffect(e) then
Duel.SendtoHand(c,nil,REASON_EFFECT) Duel.SendtoHand(c,nil,REASON_EFFECT)
end end
end end
\ No newline at end of file
...@@ -89,4 +89,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -89,4 +89,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(g,REASON_EFFECT) Duel.Destroy(g,REASON_EFFECT)
end end
end end
end end
\ No newline at end of file
...@@ -60,4 +60,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -60,4 +60,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp)
if tc:IsRelateToEffect(e) and aux.NecroValleyFilter()(tc) then if tc:IsRelateToEffect(e) and aux.NecroValleyFilter()(tc) then
Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.SendtoHand(tc,nil,REASON_EFFECT)
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