Commit e1ae2c15 authored by VanillaSalt's avatar VanillaSalt

fix

parent 8b6587ab
......@@ -55,6 +55,7 @@ field::field(duel* pduel) {
core.summon_depth = 0;
core.chain_limit = 0;
core.chain_limit_p = 0;
core.chain_solving = FALSE;
core.win_player = 5;
core.win_reason = 0;
core.reason_effect = 0;
......
......@@ -2716,7 +2716,7 @@ int32 scriptlib::duel_is_player_can_flipsummon(lua_State * L) {
return 1;
}
int32 scriptlib::duel_is_player_can_spsummon_monster(lua_State * L) {
check_param_count(L, 8);
check_param_count(L, 9);
int32 playerid = lua_tointeger(L, 1);
if(playerid != 0 && playerid != 1) {
lua_pushboolean(L, 0);
......
......@@ -40,7 +40,7 @@ function c12735388.operation(e,tp,eg,ep,ev,re,r,rp)
end
function c12735388.discon1(e,tp,eg,ep,ev,re,r,rp)
local ec=e:GetHandler():GetEquipTarget()
return ec and (ec==Duel.GetAttacker() or ec==Duel.GetAttackTarget())
return ec and (ec==Duel.GetAttacker() or ec==Duel.GetAttackTarget()) and ec:GetBattleTarget()
end
function c12735388.disop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
......@@ -70,13 +70,13 @@ function c17418744.sumlimit(e,c,sump,sumtype,sumpos,targetp,se)
end
function c17418744.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>1
and Duel.IsPlayerCanSpecialSummonMonster(tp,17418745,0x55,0x4011,2000,0,1,RACE_THUNDER,ATTRIBUTE_LIGHT) end
and Duel.IsPlayerCanSpecialSummonMonster(tp,17418745,0x55,0x4011,2000,0,4,RACE_THUNDER,ATTRIBUTE_LIGHT) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,0,0)
end
function c17418744.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>1
and Duel.IsPlayerCanSpecialSummonMonster(tp,17418745,0x55,0x4011,2000,0,1,RACE_THUNDER,ATTRIBUTE_LIGHT) then
and Duel.IsPlayerCanSpecialSummonMonster(tp,17418745,0x55,0x4011,2000,0,4,RACE_THUNDER,ATTRIBUTE_LIGHT) then
for i=1,2 do
local token=Duel.CreateToken(tp,17418745)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP_DEFENCE)
......
......@@ -24,6 +24,7 @@ function c18634367.initial_effect(c)
--spsummon
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(18634367,0))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
......
......@@ -2,7 +2,7 @@
function c18895832.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c18895832.cost)
......
......@@ -16,6 +16,7 @@ function c20951752.initial_effect(c)
--special summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(20951752,0))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_CHAIN_END)
......@@ -30,6 +31,7 @@ function c20951752.initial_effect(c)
--destroy
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(20951752,0))
e4:SetCategory(CATEGORY_DESTROY)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
e4:SetCondition(c20951752.descon)
......@@ -73,7 +75,7 @@ end
function c20951752.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c20951752.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_ONFIELD,nil)
......
......@@ -22,10 +22,10 @@ function c21888494.activate(e,tp,eg,ep,ev,re,r,rp)
local g1=Duel.GetMatchingGroup(c21888494.spfilter,tp,LOCATION_HAND,0,nil,e,tp)
local g2=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_HAND,0,nil,TYPE_SPELL+TYPE_TRAP)
if g1:GetCount()==0 or g2:GetCount()<2 then return end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(27132350,0))
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(21888494,0))
local sg1=g1:Select(tp,1,1,nil)
local sc=sg1:GetFirst()
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(27132350,1))
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(21888494,1))
local sg2=g2:Select(tp,2,2,nil)
sg1:Merge(sg2)
Duel.ConfirmCards(1-tp,sg1)
......
......@@ -3,7 +3,7 @@ function c24419823.initial_effect(c)
--salvage
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(24419823,0))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e2:SetCode(EVENT_LEAVE_FIELD)
......
......@@ -2,7 +2,7 @@
function c26533075.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetCategory(CATEGORY_POSITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
......
......@@ -21,7 +21,7 @@ function c27450400.spop(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)
if ft>ct then ft=ct end
if ft<=0 then return end
if not Duel.IsPlayerCanSpecialSummonMonster(tp,27450401,0,0x4011,0,0,4,RACE_MACHINE,ATTRIBUTE_EARTH) then return end
if not Duel.IsPlayerCanSpecialSummonMonster(tp,27450401,0,0x4011,0,0,1,RACE_MACHINE,ATTRIBUTE_EARTH) then return end
local ctn=true
while ft>0 and ctn do
local token=Duel.CreateToken(tp,27450401)
......
......@@ -2,6 +2,7 @@
function c29013526.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
......
......@@ -2,6 +2,7 @@
function c29139104.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
......
......@@ -63,7 +63,7 @@ end
function c29612557.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local g=Duel.GetMatchingGroup(c29612557.dfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,g:GetCount()*100)
end
function c29612557.desop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -16,7 +16,7 @@ function c31986288.condition(e,tp,eg,ep,ev,re,r,rp)
end
function c31986288.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>1
and Duel.IsPlayerCanSpecialSummonMonster(tp,31986289,0,0x4011,1200,1000,3,RACE_PLANT,ATTRIBUTE_DARK) end
and Duel.IsPlayerCanSpecialSummonMonster(tp,31986289,0,0x4011,1200,1200,3,RACE_PLANT,ATTRIBUTE_DARK) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,0,0)
end
......
......@@ -40,7 +40,7 @@ end
function c3283679.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c3283679.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c3283679.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
......
......@@ -56,13 +56,13 @@ function c35268887.val(e,re,dam,r,rp,rc)
else return dam end
end
function c35268887.tokentg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return c35268887[tp]~=0 and Duel.GetLocationCount(tp,LOCATION_MZONE,0)>=c35268887[tp]
if chk==0 then return c35268887[tp]~=0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>=c35268887[tp]
and Duel.IsPlayerCanSpecialSummonMonster(tp,35268888,0,0x4011,0,0,1,RACE_FIEND,ATTRIBUTE_DARK) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,c35268887[tp],0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,c35268887[tp],0,0)
end
function c35268887.tokenop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE,0)<c35268887[tp]
if Duel.GetLocationCount(tp,LOCATION_MZONE)<c35268887[tp]
or not Duel.IsPlayerCanSpecialSummonMonster(tp,35268888,0,0x4011,0,0,1,RACE_FIEND,ATTRIBUTE_DARK) then return end
for i=1,c35268887[tp] do
local token=Duel.CreateToken(tp,35268888)
......
......@@ -24,7 +24,7 @@ function c38041940.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c38041940.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c38041940.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp)
and Duel.IsPlayerCanSpecialSummonMonster(tp,38041941,0,0x4011,0,0,1,RACE_PLANT,ATTRIBUTE_EARTH,1-tp) end
and Duel.IsPlayerCanSpecialSummonMonster(tp,38041941,0,0x4011,0,0,1,RACE_PLANT,ATTRIBUTE_EARTH,POS_FACEUP_DEFENCE,1-tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c38041940.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0)
......@@ -34,7 +34,7 @@ function c38041940.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
if Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,38041941,0,0x4011,0,0,1,RACE_PLANT,ATTRIBUTE_EARTH,1-tp) then
and Duel.IsPlayerCanSpecialSummonMonster(tp,38041941,0,0x4011,0,0,1,RACE_PLANT,ATTRIBUTE_EARTH,POS_FACEUP_DEFENCE,1-tp) then
local token=Duel.CreateToken(tp,38041941)
Duel.SpecialSummonStep(token,0,tp,1-tp,false,false,POS_FACEUP_DEFENCE)
local e1=Effect.CreateEffect(e:GetHandler())
......
......@@ -2,7 +2,7 @@
function c38680149.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
......@@ -36,7 +36,7 @@ function c38680149.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.Release(rg,REASON_COST)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c38680149.filter2,tp,LOCATION_GRAVE,0,1,1,nil,lv)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c38680149.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
......
--エヴォルダー・ダルウィノス
function c39672388.initial_effect(c)
--destroy
--lvup
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(39672388,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
......@@ -21,7 +20,7 @@ function c39672388.filter(c)
end
function c39672388.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c39672388.filter(chkc) end
if chk==0 then return Duel.IsExistingMatchingCard(c39672388.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
if chk==0 then return Duel.IsExistingTarget(c39672388.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c39672388.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
end
......
......@@ -10,7 +10,7 @@ function c44910027.initial_effect(c)
e1:SetValue(SUMMON_TYPE_ADVANCE)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_LIMIT_SET_PROC)
e2:SetCondition(c44910027.ttcon)
......
......@@ -8,10 +8,10 @@ function c45023678.initial_effect(c)
e1:SetRange(LOCATION_MZONE)
e1:SetOperation(c45023678.chop)
c:RegisterEffect(e1)
--special summon
--destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(45023678,0))
e2:SetCategory(CATEGORY_DRAW)
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_CHAIN_END)
......
......@@ -20,7 +20,7 @@ function c48411996.operation(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsPlayerCanSpecialSummonMonster(tp,48411997,0x22,0x4011,0,0,1,RACE_DINOSAUR,ATTRIBUTE_FIRE) then return end
for i=1,2 do
local token=Duel.CreateToken(tp,48411997)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP_DEFENCE)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UNRELEASABLE_SUM)
......
......@@ -31,9 +31,8 @@ function c49551909.operation(e,tp,eg,ep,ev,re,r,rp)
--destroy
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e1:SetCategory(CATEGORY_DRAW)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetDescription(aux.Stringid(49551909,0))
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EVENT_BATTLE_END)
e1:SetRange(LOCATION_SZONE)
e1:SetCondition(c49551909.descon)
......
......@@ -22,7 +22,7 @@ function c54289683.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=cg:GetFirst()
local t1=Duel.IsExistingTarget(c54289683.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler())
local t2=Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,0,0,c:GetAttack(),c:GetDefence(),c:GetLevel(),c:GetRace(),c:GetAttribute())
and Duel.IsPlayerCanSpecialSummonMonster(tp,93130022,0,0x4011,c:GetAttack(),c:GetDefence(),c:GetLevel(),c:GetRace(),c:GetAttribute())
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(93130021,0))
if t1 and t2 then
op=Duel.SelectOption(tp,aux.Stringid(93130021,1),aux.Stringid(93130021,2),aux.Stringid(93130021,3))
......
......@@ -13,6 +13,7 @@ function c54912977.initial_effect(c)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(54912977,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetTarget(c54912977.sptg)
......
......@@ -2,6 +2,7 @@
function c56524813.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
......
......@@ -2,7 +2,7 @@
function c57882509.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_BE_BATTLE_TARGET)
e1:SetTarget(c57882509.target)
......
......@@ -19,10 +19,10 @@ function c58859575.initial_effect(c)
e2:SetCondition(c58859575.spcon)
e2:SetOperation(c58859575.spop)
c:RegisterEffect(e2)
--destroy
--pos
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(58859575,0))
e3:SetCategory(CATEGORY_DESTROY)
e3:SetCategory(CATEGORY_POSITION)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_MZONE)
......
......@@ -11,6 +11,7 @@ function c60417395.initial_effect(c)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(60417395,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_ATTACK_ANNOUNCE)
e2:SetRange(LOCATION_HAND)
......
......@@ -48,7 +48,7 @@ function c62437430.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetLabelObject():GetFlagEffect(62437430)~=0
and e:GetLabelObject():GetReasonEffect():GetHandler()==e:GetHandler() end
Duel.SetTargetCard(e:GetLabelObject())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetLabelObject(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetLabelObject(),1,0,0)
end
function c62437430.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
......
......@@ -17,7 +17,7 @@ function c63442604.condition(e,tp,eg,ep,ev,re,r,rp)
end
function c63442604.cfilter(c,tp)
return c:IsFaceup() and c:GetLevel()>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,63442605,0,0x11,c:GetAttack(),c:GetDefence(),c:GetLevel(),c:GetRace(),c:GetAttribute())
and Duel.IsPlayerCanSpecialSummonMonster(tp,63442605,0,0x4011,c:GetAttack(),c:GetDefence(),c:GetLevel(),c:GetRace(),c:GetAttribute())
end
function c63442604.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c63442604.cfilter(chkc,tp) end
......@@ -32,7 +32,7 @@ function c63442604.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) or tc:IsFacedown() then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,63442605,0,0x11,tc:GetAttack(),tc:GetDefence(),
or not Duel.IsPlayerCanSpecialSummonMonster(tp,63442605,0,0x4011,tc:GetAttack(),tc:GetDefence(),
tc:GetLevel(),tc:GetRace(),tc:GetAttribute()) then return end
local token=Duel.CreateToken(tp,63442605)
local e1=Effect.CreateEffect(e:GetHandler())
......
......@@ -16,6 +16,7 @@ function c65282484.initial_effect(c)
--special summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(65282484,0))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_CHAIN_END)
......@@ -30,6 +31,7 @@ function c65282484.initial_effect(c)
--destroy
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(65282484,1))
e4:SetCategory(CATEGORY_DESTROY)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
......@@ -74,7 +76,7 @@ function c65282484.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c65282484.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
......
......@@ -21,7 +21,7 @@ function c66661678.target(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c66661678.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(1-tp,LOCATION_MZONE,tp)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,66661679,0,0x4011,1000,0,1,RACE_AQUA,ATTRIBUTE_WATER) then return end
or not Duel.IsPlayerCanSpecialSummonMonster(tp,66661679,0,0x4011,1000,0,1,RACE_AQUA,ATTRIBUTE_WATER,POS_FACEUP_ATTACK,1-tp) then return end
local token=Duel.CreateToken(tp,66661679)
Duel.SpecialSummonStep(token,0,tp,1-tp,false,false,POS_FACEUP_ATTACK)
local e1=Effect.CreateEffect(e:GetHandler())
......
......@@ -2,7 +2,7 @@
function c7030340.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
......
......@@ -68,14 +68,14 @@ function c71645242.spop(e,tp,eg,ep,ev,re,r,rp)
tc=g:GetNext()
end
if s0 and Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,71645243,0,0x4011,800,800,2,RACE_PLANT,ATTRIBUTE_DARK) then
and Duel.IsPlayerCanSpecialSummonMonster(tp,71645243,0,0x4011,800,800,2,RACE_PLANT,ATTRIBUTE_DARK,POS_FACEUP_ATTACK,1-tp) then
local token=Duel.CreateToken(tp,71645243)
Duel.SpecialSummonStep(token,0x20,tp,1-tp,false,false,POS_FACEUP_ATTACK)
end
if s1 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(1-tp,71645243,0,0x4011,800,800,2,RACE_PLANT,ATTRIBUTE_DARK) then
and Duel.IsPlayerCanSpecialSummonMonster(tp,71645243,0,0x4011,800,800,2,RACE_PLANT,ATTRIBUTE_DARK) then
local token=Duel.CreateToken(1-tp,71645243)
Duel.SpecialSummonStep(token,0x20,1-tp,tp,false,false,POS_FACEUP_ATTACK)
Duel.SpecialSummonStep(token,0x20,tp,tp,false,false,POS_FACEUP_ATTACK)
end
Duel.SpecialSummonComplete()
end
......
......@@ -17,7 +17,7 @@ function c74440055.target(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c74440055.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,74440056,0,0x4011,500,500,1,RACE_PLANT,ATTRIBUTE_EARTH,1-tp) then
and Duel.IsPlayerCanSpecialSummonMonster(tp,74440056,0,0x4011,500,500,1,RACE_PLANT,ATTRIBUTE_EARTH,POS_FACEUP_DEFENCE,1-tp) then
local token=Duel.CreateToken(tp,74440056)
Duel.SpecialSummon(token,0,tp,1-tp,false,false,POS_FACEUP_DEFENCE)
end
......
......@@ -72,7 +72,7 @@ function c74530899.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local g=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,0,1-tp,g:GetCount()*300)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,g:GetCount()*300)
end
function c74530899.thop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler())
......
......@@ -63,7 +63,7 @@ function c75524092.desrepop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,c75524092.desfilter,tp,0,LOCATION_MZONE,1,1,nil)
if Duel.Destroy(g,REASON_EFFECT)>0 and Duel.Damage(1-tp,600,REASON_EFFECT)~=0 then
if Duel.GetLocationCount(1-tp,LOCATION_MZONE,tp)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,75524093,0,0x4011,2500,2500,7,RACE_FIEND,ATTRIBUTE_DARK) then
and Duel.IsPlayerCanSpecialSummonMonster(tp,75524093,0,0x4011,2500,2500,7,RACE_FIEND,ATTRIBUTE_DARK,POS_FACEUP,1-tp) then
local token=Duel.CreateToken(tp,75524093)
Duel.SpecialSummon(token,0,tp,1-tp,false,false,POS_FACEUP)
end
......
......@@ -12,7 +12,7 @@ function c83121692.initial_effect(c)
c:RegisterEffect(e1)
--set target
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(61757117,0))
e1:SetDescription(aux.Stringid(83121692,0))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
......
......@@ -20,7 +20,7 @@ end
function c86871614.target(e,tp,eg,ep,ev,re,r,rp,chk)
local ec=eg:GetFirst()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and
Duel.IsPlayerCanSpecialSummonMonster(tp,86871615,0,0x11,ec:GetBaseAttack(),ec:GetBaseDefence(),
Duel.IsPlayerCanSpecialSummonMonster(tp,86871615,0,0x4011,ec:GetBaseAttack(),ec:GetBaseDefence(),
ec:GetOriginalLevel(),ec:GetOriginalRace(),ec:GetOriginalAttribute()) end
ec:CreateEffectRelation(e)
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
......@@ -30,7 +30,7 @@ function c86871614.activate(e,tp,eg,ep,ev,re,r,rp)
local ec=eg:GetFirst()
if not ec:IsRelateToEffect(e) or ec:IsFacedown() then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,86871615,0,0x11,ec:GetBaseAttack(),ec:GetBaseDefence(),
or not Duel.IsPlayerCanSpecialSummonMonster(tp,86871615,0,0x4011,ec:GetBaseAttack(),ec:GetBaseDefence(),
ec:GetOriginalLevel(),ec:GetOriginalRace(),ec:GetOriginalAttribute()) then return end
ec:RegisterFlagEffect(86871614,RESET_EVENT+0x17a0000,0,0)
local token=Duel.CreateToken(tp,86871615)
......
......@@ -14,8 +14,10 @@ function c88928798.condition(e,tp,eg,ep,ev,re,r,rp)
if not re:IsHasType(EFFECT_TYPE_ACTIVATE) or not Duel.IsChainNegatable(ev) then return false end
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
if not g or g:GetCount()~=1 then return false end
local gc=g:GetFirst()
if not gc:IsControler(tp) or not gc:IsLocation(LOCATION_MZONE) then return false end
local ex,tg,tc=Duel.GetOperationInfo(ev,CATEGORY_DESTROY)
return ex and tg~=nil and tg:GetCount()==1 and tg:GetFirst()==g:GetFirst()
return ex and tg~=nil and tg:GetCount()==1 and tg:GetFirst()==gc
end
function c88928798.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
......@@ -27,5 +29,8 @@ function c88928798.target(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c88928798.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateActivation(ev)
if re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
Duel.Damage(1-tp,500,REASON_EFFECT)
end
......@@ -19,7 +19,7 @@ function c89893715.filter(c)
end
function c89893715.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c89893715.filter,tp,LOCATION_DECK,0,2,nil) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,2,tp,LOCATION_DECK)
end
function c89893715.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c89893715.filter,tp,LOCATION_DECK,0,nil)
......
......@@ -2,6 +2,7 @@
function c92518817.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
......
......@@ -17,7 +17,7 @@ function c93130021.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
local t1=Duel.IsExistingTarget(c93130021.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
local t2=Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,0,0,c:GetAttack(),c:GetDefence(),c:GetLevel(),c:GetRace(),c:GetAttribute())
and Duel.IsPlayerCanSpecialSummonMonster(tp,93130022,0,0x4011,c:GetAttack(),c:GetDefence(),c:GetLevel(),c:GetRace(),c:GetAttribute())
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(93130021,0))
if t1 and t2 then
op=Duel.SelectOption(tp,aux.Stringid(93130021,1),aux.Stringid(93130021,2),aux.Stringid(93130021,3))
......
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