Commit 407a4981 authored by Nemo Ma's avatar Nemo Ma

fix

parent 75db966b
This diff is collapsed.
--邪心英雄 堕影魔王
function c10150051.initial_effect(c)
aux.AddCodeList(c,94820406)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcCodeFun(c,10150070,aux.FilterBoolFunction(Card.IsRace,RACE_FIEND),1,true,true)
......@@ -74,14 +75,19 @@ function c10150051.atkop(e,tp,eg,ep,ev,re,r,rp)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_IMMUNE_EFFECT)
e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,2)
e2:SetCondition(c10150051.econ)
e2:SetValue(c10150051.efilter)
e2:SetOwnerPlayer(tp)
tc:RegisterEffect(e2)
end
end
function c10150051.econ(e)
return Duel.GetCurrentPhase() ~= PHASE_MAIN2
end
function c10150051.efilter(e,re)
return e:GetOwnerPlayer()~=re:GetOwnerPlayer()
end
function c10150051.splimit(e,se,sp,st)
return st==SUMMON_TYPE_FUSION+0x10
return se:GetHandler():IsCode(94820406)
or Duel.IsPlayerAffectedByEffect(sp,72043279) and st&SUMMON_TYPE_FUSION==SUMMON_TYPE_FUSION
end
......@@ -73,10 +73,11 @@ function cm.act(e,tp)
local code,race,att,lv,atk,def=table.unpack(mat)
local tk=Duel.CreateToken(tp,86871615)
local e1=rsef.SV_LIMIT({c,tk,true},"ress",nil,nil,rsreset.est-RESET_TOFIELD)
rscf.QuickBuff({c,tk,true},"code",code,"lv",lv,"race",race,"att",att,"batk",atk,"bdef",def,"rst",rsreset.est-RESET_TOFIELD)
Duel.SpecialSummonStep(tk,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
Scl.AddSingleBuff(nil, "=Name", code, "=Level", lv, "=Race", race, "=Attribute", att, "=BaseATK", atk, "=BaseDEF", def, "Reset", RESETS_SCL - RESET_TOFIELD)
--rscf.QuickBuff({c,tk,true},"code",code,"lv",lv,"race",race,"att",att,"batk",atk,"bdef",def,"rst",rsreset.est-RESET_TOFIELD)
Scl.SpecialSummonStep(tk,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
end
Duel.SpecialSummonComplete()
Scl.SpecialSummonComplete()
end
function cm.splimit(e,c,sump,sumtype,sumpos,targetp,se)
if not c:IsLocation(LOCATION_EXTRA) then return false end
......
......@@ -666,8 +666,8 @@ end
function rssf.SpecialSummonEither(sum_card, sum_eff, sum_typ, sum_pl, loc_pl, ignore_con, ignore_revie, pos, sum_zone)
return Scl.SpecialSummon2EitherFieldStep(sum_card, sum_typ, sum_pl, ignore_con, ignore_revie, pos, sum_zone)
end
rsval.spconfe = scl.value_spsummon_from_extra("SpecialSummon")
rsval.spconbe = scl.value_spsummon_by_card_effects
rsval.spconfe = scl.value_special_summon_from_extra("SpecialSummon")
rsval.spconbe = scl.value_special_summon_by_card_effects
function rsval.indbae(str1, str2)
if not str1 and not str2 then
str1 = "Battle"
......@@ -931,7 +931,7 @@ rscon.turns = scl.cond_during_your_turn
rscon.turno = scl.cond_during_opponents_turn
rscon.phmp = scl.cond_during_phase("M1,M2")
rscon.phbp = scl.cond_during_phase("BP")
rscon.prepup = scl.cond_faceup_leaves()
rscon.prepup = scl.cond_previous_faceup
function rstg.chnlim(sp, op)
return function(g, e, tp)
Duel.SetChainLimit(rsval.chainlimit(sp, op, g))
......
......@@ -14,7 +14,6 @@ function cm.initial_effect(c)
--set
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(11451631,6))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_HAND+LOCATION_GRAVE)
......
......@@ -57,13 +57,13 @@ function cm.spgfilter(c,e,tp)
return c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_ROCK) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
local lg=Duel.GetMatchingGroup(cm.cfilter,tp,LOCATION_GRAVE,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,cm.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
local sg=Duel.GetMatchingGroup(cm.spgfilter,tp,LOCATION_HAND,0,nil,e,tp)
if Duel.SendtoGrave(g,REASON_EFFECT)>0 then
if sg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(m,1)) and lg:GetClassCount(Card.GetLevel)>=3 then
if Duel.SendtoGrave(g,REASON_EFFECT)~=0 then
local lg=Duel.GetMatchingGroup(cm.cfilter,tp,LOCATION_GRAVE,0,nil)
if sg:GetCount()>0 and lg:GetClassCount(Card.GetLevel)>=3 and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local spg=sg:Select(tp,1,1,nil)
......
......@@ -31,13 +31,13 @@ function cm.thfilter(c)
return aux.IsCodeListed(c,40010618) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() and not c:IsCode(m)
end
function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
local lg=Duel.GetMatchingGroup(cm.cfilter,tp,LOCATION_GRAVE,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,cm.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
local tg=Duel.GetMatchingGroup(cm.thfilter,tp,LOCATION_DECK,0,nil)
if Duel.SendtoGrave(g,REASON_EFFECT)>0 then
if tg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(m,1)) and lg:GetClassCount(Card.GetLevel)>=3 then
if Duel.SendtoGrave(g,REASON_EFFECT)~=0 then
local lg=Duel.GetMatchingGroup(cm.cfilter,tp,LOCATION_GRAVE,0,nil)
if tg:GetCount()>0 and lg:GetClassCount(Card.GetLevel)>=3 and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local stg=tg:Select(tp,1,1,nil)
......
......@@ -72,13 +72,15 @@ function cm.thfilter(c,e,tp)
return c:IsType(TYPE_MONSTER) and aux.IsCodeListed(c,40010618) and not c:IsCode(m) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local lg=Duel.GetMatchingGroup(cm.cgfilter,tp,LOCATION_GRAVE,0,nil)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 and Duel.SelectYesNo(tp,aux.Stringid(m,0)) and lg:GetClassCount(Card.GetLevel)>=3 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil,e,tp) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
local lg=Duel.GetMatchingGroup(cm.cgfilter,tp,LOCATION_GRAVE,0,nil)
if lg:GetClassCount(Card.GetLevel)>=3 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil,e,tp) and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
end
function cm.fusop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -104,13 +104,13 @@ function s.filter2(c)
return c:IsSetCard(0xbd) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() and c:IsLevel(7)
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.filter1),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil)
and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.filter2),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_DECK+LOCATION_GRAVE)
if chk==0 then return Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.filter1),tp,LOCATION_DECK,0,1,nil)
and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.filter2),tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_DECK)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
local g1=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.filter1),tp,LOCATION_DECK+LOCATION_GRAVE,0,nil)
local g2=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.filter2),tp,LOCATION_DECK+LOCATION_GRAVE,0,nil)
local g1=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.filter1),tp,LOCATION_DECK,0,nil)
local g2=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.filter2),tp,LOCATION_DECK,0,nil)
if g1:GetCount()>0 and g2:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg1=g1:Select(tp,1,1,nil)
......
......@@ -11,6 +11,7 @@ function cm.initial_effect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.con1)
e1:SetTarget(cm.tg1)
e1:SetOperation(cm.op1)
......@@ -20,6 +21,7 @@ function cm.initial_effect(c)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,m)
e2:SetCost(aux.bfgcost)
e2:SetTarget(cm.tg2)
e2:SetOperation(cm.op2)
......
......@@ -28,7 +28,10 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,cm.tgfilter,tp,LOCATION_EXTRA,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
if Duel.GetTurnCount()>=2 then
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
end
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
\ No newline at end of file
......@@ -89,7 +89,7 @@ function cm.imop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
local g=Duel.SelectMatchingCard(tp,cm.tdfilter,tp,LOCATION_REMOVED,0,1,1,nil)
if tc:IsRelateToEffect(e) and Duel.SendtoDeck(g,2,REASON_EFFECT) then
if tc:IsRelateToEffect(e) and Duel.SendtoDeck(g,nil,2,REASON_EFFECT) then
--cannot target
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......
......@@ -79,7 +79,7 @@ function c79029817.dsop(e,tp,eg,ep,ev,re,r,rp)
end
end
function c79029817.xyzfilter(c,g)
return c:IsRace(RACE_MACHINE) and c:IsXyzSummonable(g)
return c:IsRace(RACE_MACHINE) and c:IsXyzSummonable(g,1,99)
end
function c79029817.xyztg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(Card.IsSetCard,tp,LOCATION_MZONE,0,nil,0xa991)
......@@ -92,7 +92,7 @@ function c79029817.xyzop(e,tp,eg,ep,ev,re,r,rp)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=g:Select(tp,1,1,nil)
Duel.XyzSummon(tp,tg:GetFirst(),xg)
Duel.XyzSummon(tp,tg:GetFirst(),xg,1,99)
end
end
......@@ -54,8 +54,8 @@ function c79029819.ovfilter(c)
end
function c79029819.xyzop(e,tp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c79029819.cfilter,tp,LOCATION_HAND+LOCATION_REMOVED,0,1,nil) end
local g=Duel.SelectMatchingCard(tp,c79029819.cfilter,tp,LOCATION_HAND+LOCATION_REMOVED,0,1,1,nil)
Duel.SendtoDeck(g,nil,2,REASON_COST)
local tc=Duel.SelectMatchingCard(tp,c79029819.cfilter,tp,LOCATION_HAND+LOCATION_REMOVED,0,1,1,nil):GetFirst()
Duel.SendtoDeck(tc,nil,2,REASON_COST)
end
function c79029819.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
......
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