Commit ca623825 authored by Nemo Ma's avatar Nemo Ma

fix

parent eb09bbec
......@@ -32,9 +32,7 @@ end
function cm.drop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local pt=c:GetOwner()
if c:IsRelateToEffect(e) then
Duel.GetControl(c,1-tp)
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CHANGE_DAMAGE)
......@@ -59,7 +57,16 @@ function cm.drop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.sfilter,0,LOCATION_ONFIELD,LOCATION_ONFIELD,c,c:GetControler(),c:GetSequence(),c:GetLocation())
local g2=c:GetColumnGroup()
g:Merge(g2)
Duel.Overlay(c, g)
if g:IsExists(cm.filter2,1,nil) then
local aa=g:Filter(cm.filter2,nil)
for tc in aux.Next(aa) do
Duel.Overlay(c,tc:GetOverlayGroup())
end
end
Duel.Overlay(c,g)--重叠有超量素材的怪兽时,记得把那些超量素材也一起重叠
end
function cm.filter2(c)
return c:IsType(TYPE_XYZ)
end
function cm.filter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......
......@@ -38,7 +38,7 @@ end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
local lv=Duel.GetCurrentChain()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil,e,tp,lv) end
and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil,e,tp,lv+1) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
......
......@@ -38,7 +38,7 @@ end
function s.lsop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local oc=c:GetOverlayGroup():GetFirst()
local ctype=oc:GetType()|0x48020c0
local ctype=oc:GetType()&0x48020c0
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
......
......@@ -49,6 +49,7 @@ function s.sptg(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)
and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
e:GetHandler():RegisterFlagEffect(0,RESET_CHAIN,EFFECT_FLAG_CLIENT_HINT,1,0,65)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
......@@ -102,6 +103,8 @@ function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,ct)
end
function s.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
if not e:GetHandler():IsRelateToEffect(e) then return end
local ct=e:GetHandler():GetOverlayGroup():GetClassCount(Card.GetLevel)
--local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(tp,ct,REASON_EFFECT)
end
\ No newline at end of file
......@@ -76,7 +76,7 @@ function s.initial_effect(c)
end
end
end
fantasy_SendtoHand(card_c_or_g,int_player,int_reason)
return fantasy_SendtoHand(card_c_or_g,int_player,int_reason)
end
end
end
......@@ -96,9 +96,10 @@ function s.tgfilte(c)
return c.fantasy_mountains_and_rivers and c:IsAbleToGrave()
end
function s.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) and (e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) or 1==1)
and e:GetHandler():IsSummonable(true,nil)
and Duel.IsExistingMatchingCard(s.tgfilte,tp,LOCATION_HAND,0,1,e:GetHandler()) end
e:GetHandler():RegisterFlagEffect(0,RESET_CHAIN,EFFECT_FLAG_CLIENT_HINT,1,0,65)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
Duel.SetOperationInfo(0,CATEGORY_SUMMON,e:GetHandler(),1,0,0)
......
......@@ -28,6 +28,7 @@ function s.initial_effect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,EFFECT_COUNT_CODE_CHAIN)
e3:SetCost(s.rmcost)
e3:SetTarget(s.rmtg)
e3:SetOperation(s.rmop)
......
......@@ -52,6 +52,9 @@ function s.damcon(e,tp,eg,ep,ev,re,r,rp)
end
function s.sccon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsPreviousLocation(LOCATION_SZONE) then
e:GetHandler():RegisterFlagEffect(0,RESET_CHAIN,EFFECT_FLAG_CLIENT_HINT,1,0,209)
end
return c:IsPreviousLocation(LOCATION_SZONE)
end
function s.descost(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -72,7 +72,7 @@ function s.initial_effect(c)
end
end
end
fantasy_SendtoDeck(g,int_player,int_seq,int_reason)
return fantasy_SendtoDeck(g,int_player,int_seq,int_reason)
else
local pl=0
if int_player then
......@@ -89,20 +89,20 @@ function s.initial_effect(c)
Duel.BreakEffect()
end
end
fantasy_SendtoDeck(card_c_or_g,int_player,int_seq,int_reason)
return fantasy_SendtoDeck(card_c_or_g,int_player,int_seq,int_reason)
end
end
end
end
s.fantasy_mountains_and_rivers=true
function s.fantasy_setfilter(c)
return c.fantasy_mountains_and_rivers and not c:IsCode(id)
return c.fantasy_mountains_and_rivers --and not c:IsCode(id)
and c:IsAbleToHandAsCost()
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
......@@ -111,13 +111,18 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.HintSelection(sg)
if Duel.SendtoHand(sg,nil,REASON_EFFECT)~=0 and sg:FilterCount(Card.IsLocation,nil,LOCATION_HAND+LOCATION_EXTRA)~=0
and Duel.GetCurrentChain()>3 then
local dg=Group.CreateGroup()
for i=1,ev do
local te,tgp=Duel.GetChainInfo(i,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
if tgp~=tp then
Duel.NegateActivation(i)
if tgp~=tp and Duel.NegateActivation(i) then
local tc=te:GetHandler()
if tc:IsRelateToEffect(te) then
dg:AddCard(tc)
end
end
end
Duel.SendtoDeck(dg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
end
end
function s.actcon(e)
......
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