Commit b0ebd7f1 authored by sidschingis's avatar sidschingis

Merge remote-tracking branch 'upstream/master'

Conflicts:
	script/c54366836.lua
parents 4c82c179 1f5a7407
--No.48 シャドー・リッチ
function c1426714.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,aux.XyzFilterFunction(c,3),2)
c:EnableReviveLimit()
--token
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1426714,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(c1426714.spcon)
e1:SetCost(c1426714.spcost)
e1:SetTarget(c1426714.sptg)
e1:SetOperation(c1426714.spop)
c:RegisterEffect(e1)
--cannot be battle target
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET)
e2:SetCondition(c1426714.atkcon)
e2:SetValue(1)
c:RegisterEffect(e2)
--atk
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetRange(LOCATION_MZONE)
e3:SetValue(c1426714.atkval)
c:RegisterEffect(e3)
end
function c1426714.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
end
function c1426714.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c1426714.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,1426715,0,0x4011,500,500,1,RACE_FIEND,ATTRIBUTE_DARK) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c1426714.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,1426715,0,0x4011,500,500,1,RACE_FIEND,ATTRIBUTE_DARK) then return end
local token=Duel.CreateToken(tp,1426715)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)
end
function c1426714.atkcon(e)
return Duel.IsExistingMatchingCard(Card.IsCode,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,1,nil,1426715)
end
function c1426714.atkval(e,c)
return Duel.GetMatchingGroupCount(Card.IsCode,c:GetControler(),LOCATION_ONFIELD,0,nil,1426715)*500
end
......@@ -24,9 +24,9 @@ end
function c31677606.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and c31677606.filter(chkc) end
if chk==0 then return Duel.IsPlayerCanDraw(tp,1)
and Duel.IsExistingTarget(c31677606.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
and Duel.IsExistingTarget(c31677606.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,c31677606.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
local g=Duel.SelectTarget(tp,c31677606.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
......
--天穹覇龍ドラゴアセンション
function c37910722.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--atk
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(37910722,0))
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(c37910722.atkcon)
e1:SetOperation(c37910722.atkop)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(37910722,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCondition(c37910722.spcon)
e2:SetTarget(c37910722.sptg)
e2:SetOperation(c37910722.spop)
c:RegisterEffect(e2)
end
function c37910722.atkcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_SYNCHRO
end
function c37910722.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
local ct=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(ct*800)
e1:SetReset(RESET_EVENT+0x1ff0000)
c:RegisterEffect(e1)
end
end
function c37910722.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return rp~=tp and c:IsReason(REASON_DESTROY)
and c:IsPreviousLocation(LOCATION_ONFIELD) and c:GetPreviousControler()==tp
end
function c37910722.spfilter(c,e,tp,sync)
return c:IsControler(tp) and c:IsLocation(LOCATION_GRAVE)
and bit.band(c:GetReason(),0x80008)==0x80008 and c:GetReasonCard()==sync
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsHasEffect(EFFECT_NECRO_VALLEY)
end
function c37910722.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local mg=c:GetMaterial()
local ct=mg:GetCount()
if chk==0 then return c:GetSummonType()==SUMMON_TYPE_SYNCHRO
and ct>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>=ct
and mg:FilterCount(c37910722.spfilter,nil,e,tp,c)==ct end
Duel.SetTargetCard(mg)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,mg,ct,0,0)
end
function c37910722.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local mg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local g=mg:Filter(Card.IsRelateToEffect,nil,e)
if g:GetCount()<mg:GetCount() then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<g:GetCount() then return end
local tc=g:GetFirst()
while tc do
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e2)
tc=g:GetNext()
end
Duel.SpecialSummonComplete()
end
......@@ -19,7 +19,7 @@ function c46668237.cfilter(c,tp)
and bit.band(c:GetPreviousRaceOnField(),RACE_BEAST)~=0
end
function c46668237.condition(e,tp,eg,ep,ev,re,r,rp)
return not eg:IsContains(e:GetHandler()) and eg:IsExists(c46668237.cfilter,1,nil,tp)
return not eg:IsContains(e:GetHandler()) and eg:IsExists(c46668237.cfilter,1,nil,tp) and bit.band(r,REASON_DESTROY)~=0
end
function c46668237.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,1000) end
......
......@@ -9,7 +9,7 @@ function c54366836.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetCondition(c54366836.con)
e1:SetCondition(c54366836.indcon)
e1:SetValue(1)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
......@@ -31,9 +31,6 @@ function c54366836.initial_effect(c)
e3:SetOperation(c54366836.damop2)
c:RegisterEffect(e3)
end
function c54366836.con(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsAttackPos()
end
function c54366836.damcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return ep==tp and c:IsRelateToBattle()
......@@ -61,3 +58,6 @@ function c54366836.damop2(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_PHASE+PHASE_DAMAGE_CAL)
Duel.RegisterEffect(e1,tp)
end
function c54366836.indcon(e)
return e:GetHandler():IsPosition(POS_FACEUP_ATTACK)
end
......@@ -25,7 +25,7 @@ function c70908596.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c70908596.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c70908596.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,c70908596.filter,tp,LOCATION_MZONE,0,1,1,nil)
local g=Duel.SelectTarget(tp,c70908596.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
local tc=g:GetFirst()
local op=0
if tc:GetLevel()==1 then op=Duel.SelectOption(tp,aux.Stringid(70908596,1))
......
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