Commit d9100158 authored by wind2009's avatar wind2009

Merge branch 'merge-upstream' into 'master'

Merge upstream

See merge request mycard/ygopro-scripts-888!67
parents 2555882b b1032443
...@@ -26,7 +26,7 @@ function c1965724.initial_effect(c) ...@@ -26,7 +26,7 @@ function c1965724.initial_effect(c)
end end
function c1965724.cfilter(c,tp) function c1965724.cfilter(c,tp)
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) return c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP)
and c:IsPreviousControler(tp) and c:IsRace(RACE_FAIRY) and c:IsPreviousControler(tp) and c:GetPreviousRaceOnField()&RACE_FAIRY~=0
end end
function c1965724.cfilter2(c) function c1965724.cfilter2(c)
return c:IsFaceup() and c:IsCode(27288416) return c:IsFaceup() and c:IsCode(27288416)
......
...@@ -4,7 +4,7 @@ function s.initial_effect(c) ...@@ -4,7 +4,7 @@ function s.initial_effect(c)
--destroy --destroy
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0)) e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetRange(LOCATION_HAND) e1:SetRange(LOCATION_HAND)
e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCode(EVENT_SPSUMMON_SUCCESS)
......
...@@ -36,7 +36,7 @@ function s.cfilter(c,re) ...@@ -36,7 +36,7 @@ function s.cfilter(c,re)
or recode==EFFECT_QP_ACT_IN_SET_TURN or recode==EFFECT_QP_ACT_IN_SET_TURN
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 eg:IsExists(s.cfilter,1,nil,re) return eg:IsExists(s.cfilter,1,nil,re) and r&REASON_COST>0
end end
function s.tgfilter(c) function s.tgfilter(c)
return c:IsRace(RACE_ILLUSION+RACE_SPELLCASTER) and c:IsType(TYPE_MONSTER) and c:IsAbleToGrave() return c:IsRace(RACE_ILLUSION+RACE_SPELLCASTER) and c:IsType(TYPE_MONSTER) and c:IsAbleToGrave()
......
...@@ -36,6 +36,7 @@ function c49398568.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -36,6 +36,7 @@ function c49398568.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
e:SetCostCheck(false) e:SetCostCheck(false)
ftg(e,tp,eg,ep,ev,re,r,rp,chk) ftg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
Duel.ClearOperationInfo(0)
end end
function c49398568.activate(e,tp,eg,ep,ev,re,r,rp) function c49398568.activate(e,tp,eg,ep,ev,re,r,rp)
local fop=re:GetOperation() local fop=re:GetOperation()
......
...@@ -52,7 +52,8 @@ function c63060238.tgop(e,tp,eg,ep,ev,re,r,rp) ...@@ -52,7 +52,8 @@ function c63060238.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c63060238.tgfilter,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c63060238.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
local tc=g:GetFirst() local tc=g:GetFirst()
if tc and Duel.SendtoGrave(tc,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_GRAVE) then if tc and Duel.SendtoGrave(tc,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_GRAVE)
and c:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_ATTRIBUTE) e1:SetCode(EFFECT_CHANGE_ATTRIBUTE)
......
...@@ -51,7 +51,7 @@ function c71187462.tgop(e,tp,eg,ep,ev,re,r,rp) ...@@ -51,7 +51,7 @@ function c71187462.tgop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local clv=c:GetLevel() local clv=c:GetLevel()
local lv=8-clv local lv=8-clv
if c:IsRelateToEffect(e) and not c:IsFacedown() and lv>0 then if c:IsRelateToEffect(e) and lv>0 then
local g=Duel.GetMatchingGroup(c71187462.tgfilter,tp,LOCATION_DECK,0,nil) local g=Duel.GetMatchingGroup(c71187462.tgfilter,tp,LOCATION_DECK,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tg=g:SelectWithSumEqual(tp,Card.GetLevel,lv,1,99) local tg=g:SelectWithSumEqual(tp,Card.GetLevel,lv,1,99)
......
...@@ -16,7 +16,6 @@ function c73422829.initial_effect(c) ...@@ -16,7 +16,6 @@ function c73422829.initial_effect(c)
e2:SetDescription(aux.Stringid(73422829,1)) e2:SetDescription(aux.Stringid(73422829,1))
e2:SetCategory(CATEGORY_TOGRAVE) e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SUMMON_SUCCESS) e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetCountLimit(1,73422830) e2:SetCountLimit(1,73422830)
e2:SetTarget(c73422829.tgtg) e2:SetTarget(c73422829.tgtg)
......
...@@ -87,7 +87,7 @@ function c81470373.splimit(e,c) ...@@ -87,7 +87,7 @@ function c81470373.splimit(e,c)
end end
function c81470373.tgop(e,tp,eg,ep,ev,re,r,rp) function c81470373.tgop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if Duel.SendtoGrave(c,REASON_EFFECT)~=0 and c:IsLocation(LOCATION_GRAVE) then if Duel.SendtoGrave(c,REASON_EFFECT)~=0 then
Duel.Damage(tp,1000,REASON_EFFECT) Duel.Damage(tp,1000,REASON_EFFECT)
end end
end end
...@@ -3,8 +3,7 @@ local s,id,o=GetID() ...@@ -3,8 +3,7 @@ local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
--material --material
aux.AddMaterialCodeList(c,38033121,46986414) aux.AddFusionProcCodeFun(c,{46986414,38033121},aux.FilterBoolFunction(Card.IsRace,RACE_DRAGON+RACE_SPELLCASTER),1,true,true)
aux.AddFusionProcFun2(c,aux.FilterBoolFunction(Card.IsFusionCode,38033121,46986414),aux.FilterBoolFunction(Card.IsRace,RACE_DRAGON+RACE_SPELLCASTER),true)
--immune --immune
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
......
...@@ -22,6 +22,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -22,6 +22,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
and Duel.IsExistingTarget(Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,nil) end and Duel.IsExistingTarget(Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g1=Duel.SelectTarget(tp,s.thfilter,tp,LOCATION_MZONE,0,1,1,nil) local g1=Duel.SelectTarget(tp,s.thfilter,tp,LOCATION_MZONE,0,1,1,nil)
e:SetLabelObject(g1:GetFirst())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g2=Duel.SelectTarget(tp,Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,1,nil) local g2=Duel.SelectTarget(tp,Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g1,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g1,1,0,0)
...@@ -29,15 +30,13 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -29,15 +30,13 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function s.operation(e,tp,eg,ep,ev,re,r,rp) function s.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local _,hg=Duel.GetOperationInfo(0,CATEGORY_TOHAND) local tg=Duel.GetTargetsRelateToChain()
local hc=hg:GetFirst() local hc=e:GetLabelObject()
local chk=hc:IsType(TYPE_RITUAL) if hc and hc:IsControler(tp) and hc:IsRelateToEffect(e)
if hc:IsControler(tp) and hc:IsRelateToEffect(e)
and Duel.SendtoHand(hc,nil,REASON_EFFECT)>0 and hc:IsLocation(LOCATION_HAND) then and Duel.SendtoHand(hc,nil,REASON_EFFECT)>0 and hc:IsLocation(LOCATION_HAND) then
local _,tg=Duel.GetOperationInfo(0,CATEGORY_CONTROL) local tc=(tg-hc):GetFirst()
local tc=tg:GetFirst() if tc and tc:IsControler(1-tp) and tc:IsRelateToEffect(e)
if tc:IsControler(1-tp) and tc:IsRelateToEffect(e) and Duel.GetControl(tc,tp)>0 and not hc:IsType(TYPE_RITUAL) then
and Duel.GetControl(tc,tp)>0 and not chk then
local fid=c:GetFieldID() local fid=c:GetFieldID()
tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1,fid) tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1,fid)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
......
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