Commit 9c1316d3 authored by wind2009's avatar wind2009

Fix

parent 1c7f6622
No preview for this file type
...@@ -20,7 +20,6 @@ function s.initial_effect(c) ...@@ -20,7 +20,6 @@ function s.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,id+o) e1:SetCountLimit(1,id+o)
e2:SetCondition(s.drcon)
e2:SetTarget(s.drtg) e2:SetTarget(s.drtg)
e2:SetOperation(s.drop) e2:SetOperation(s.drop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
...@@ -45,11 +44,8 @@ end ...@@ -45,11 +44,8 @@ end
function s.cfilter(c) function s.cfilter(c)
return c:IsFaceup() and c.dark_calling return c:IsFaceup() and c.dark_calling
end end
function s.drcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) and Duel.IsPlayerCanDraw(tp,2) end
Duel.SetTargetPlayer(tp) Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(2) Duel.SetTargetParam(2)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
......
...@@ -62,12 +62,13 @@ function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -62,12 +62,13 @@ function s.settg(e,tp,eg,ep,ev,re,r,rp,chk)
end 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 Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_SZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,s.stfilter,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,s.stfilter,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then if #g>0 then
Duel.SSet(tp,g) Duel.SSet(tp,g)
end end
end
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
......
...@@ -13,7 +13,7 @@ function s.initial_effect(c) ...@@ -13,7 +13,7 @@ function s.initial_effect(c)
e1:SetCode(EFFECT_SPSUMMON_CONDITION) e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.DarkFusionLimit) e1:SetValue(aux.DarkFusionLimit)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--Negate --gain control
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0)) e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_CONTROL) e2:SetCategory(CATEGORY_CONTROL)
...@@ -74,7 +74,7 @@ function s.contg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -74,7 +74,7 @@ function s.contg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function s.conop(e,tp,eg,ep,ev,re,r,rp) function s.conop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then if tc:IsType(TYPE_MONSTER) and tc:IsRelateToEffect(e) then
Duel.GetControl(tc,tp) Duel.GetControl(tc,tp)
end end
end end
\ No newline at end of file
...@@ -38,17 +38,17 @@ function s.initial_effect(c) ...@@ -38,17 +38,17 @@ function s.initial_effect(c)
e4:SetOperation(s.spop) e4:SetOperation(s.spop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
s.DarkFusion_Limit=true s.dark_calling=true
function s.atkval(e,c) function s.atkval(e,c)
local c=e:GetHandler() local ec=e:GetHandler()
local g=c:GetMaterial() local g=ec:GetMaterial()
local mg=g:Filter(Card.IsType,nil,TYPE_MONSTER) local mg=g:Filter(Card.IsType,nil,TYPE_MONSTER)
local atk=mg:GetSum(Card.GetBaseAttack) local atk=mg:GetSum(Card.GetBaseAttack)
return -atk return -atk
end end
function s.spcon(e,tp,eg,ep,ev,re,r,rp) function s.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return c:IsSummonType(SUMMON_TYPE_SPECIAL) and c:IsPreviousLocation(LOCATION_MZONE) return c:IsSummonType(SUMMON_TYPE_SPECIAL) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP)
and c:IsPreviousControler(tp) and c:GetReasonPlayer()==1-tp and c:IsPreviousControler(tp) and c:GetReasonPlayer()==1-tp
end end
function s.filter(c,e,tp) function s.filter(c,e,tp)
...@@ -64,7 +64,7 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -64,7 +64,7 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end 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) then if tc:IsRelateToEffect(e) and aux.NecroValleyFilter()(tc) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
end end
end end
\ No newline at end of file
...@@ -4,11 +4,10 @@ function s.initial_effect(c) ...@@ -4,11 +4,10 @@ function s.initial_effect(c)
aux.AddCodeList(c,94820406) aux.AddCodeList(c,94820406)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,2)) e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND+CATEGORY_SEARCH)
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)
e1:SetCountLimit(1,id) e1:SetCountLimit(1,id)
e1:SetCost(s.cost) e1:SetCost(s.cost)
e1:SetTarget(s.target) e1:SetTarget(s.target)
...@@ -20,7 +19,6 @@ function s.initial_effect(c) ...@@ -20,7 +19,6 @@ function s.initial_effect(c)
e2:SetCategory(CATEGORY_TOHAND) e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE) e2:SetRange(LOCATION_GRAVE)
e2:SetHintTiming(0,TIMING_END_PHASE)
e2:SetCountLimit(1,id+o) e2:SetCountLimit(1,id+o)
e2:SetCondition(aux.exccon) e2:SetCondition(aux.exccon)
e2:SetCost(aux.bfgcost) e2:SetCost(aux.bfgcost)
......
...@@ -15,6 +15,7 @@ function s.initial_effect(c) ...@@ -15,6 +15,7 @@ function s.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--to deck --to deck
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_TODECK) e2:SetCategory(CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
...@@ -29,7 +30,7 @@ function s.initial_effect(c) ...@@ -29,7 +30,7 @@ function s.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function s.cfilter(c) function s.cfilter(c)
return (c:IsCode(94820406) or aux.IsCodeListed(c,94820406)) and c:IsType(TYPE_SPELL) return (c:IsCode(94820406) or aux.IsCodeListed(c,94820406)) and c:IsType(TYPE_SPELL+TYPE_TRAP)
end end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local ct=Duel.GetMatchingGroupCount(s.cfilter,tp,LOCATION_GRAVE,0,nil) local ct=Duel.GetMatchingGroupCount(s.cfilter,tp,LOCATION_GRAVE,0,nil)
...@@ -73,15 +74,15 @@ function s.tdfilter(c) ...@@ -73,15 +74,15 @@ function s.tdfilter(c)
return c:IsFaceupEx() and c:IsSetCard(0x8) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck() return c:IsFaceupEx() and c:IsSetCard(0x8) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck()
end end
function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.tdtg(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+LOCATION_REMOVED) and chkc:IsControler(tp) and s.tdfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(s.tdfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end if chk==0 then return Duel.IsExistingTarget(s.tdfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,s.tdfilter,tp,LOCATION_GRAVE,0,1,5,nil) local g=Duel.SelectTarget(tp,s.tdfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,5,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
end end
function s.tdop(e,tp,eg,ep,ev,re,r,rp) function s.tdop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetTargetsRelateToChain() local g=Duel.GetTargetsRelateToChain()
if g:GetCount()>0 then if g:GetCount()>0 and aux.NecroValleyFilter()(g) 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
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