Commit 5cd246e4 authored by argon.sun's avatar argon.sun

fix & new scripts

parent 445e5f1f
...@@ -411,15 +411,24 @@ int32 field::get_useable_count(uint8 playerid, uint8 location, uint32* list) { ...@@ -411,15 +411,24 @@ int32 field::get_useable_count(uint8 playerid, uint8 location, uint32* list) {
void field::shuffle(uint8 playerid, uint8 location) { void field::shuffle(uint8 playerid, uint8 location) {
if(!(location & (LOCATION_HAND + LOCATION_DECK))) if(!(location & (LOCATION_HAND + LOCATION_DECK)))
return; return;
card* t;
card_vector& svector = (location == LOCATION_HAND) ? player[playerid].list_hand : player[playerid].list_main; card_vector& svector = (location == LOCATION_HAND) ? player[playerid].list_hand : player[playerid].list_main;
if(svector.size() == 0) if(svector.size() == 0)
return; return;
if(location == LOCATION_HAND) {
bool shuffle = false;
for(auto cit = svector.begin(); cit != svector.end(); ++cit)
if(!(*cit)->is_status(STATUS_IS_PUBLIC))
shuffle = true;
if(!shuffle) {
core.shuffle_hand_check[playerid] = FALSE;
return;
}
}
if(svector.size() > 1) { if(svector.size() > 1) {
uint32 i = 0, s = svector.size(), r; uint32 i = 0, s = svector.size(), r;
for(i = 0; i < s - 1; ++i) { for(i = 0; i < s - 1; ++i) {
r = pduel->get_next_integer(i, s - 1); r = pduel->get_next_integer(i, s - 1);
t = svector[i]; card* t = svector[i];
svector[i] = svector[r]; svector[i] = svector[r];
svector[r] = t; svector[r] = t;
} }
...@@ -429,7 +438,7 @@ void field::shuffle(uint8 playerid, uint8 location) { ...@@ -429,7 +438,7 @@ void field::shuffle(uint8 playerid, uint8 location) {
pduel->write_buffer8(MSG_SHUFFLE_HAND); pduel->write_buffer8(MSG_SHUFFLE_HAND);
pduel->write_buffer8(playerid); pduel->write_buffer8(playerid);
pduel->write_buffer8(player[playerid].list_hand.size()); pduel->write_buffer8(player[playerid].list_hand.size());
for(auto cit = player[playerid].list_hand.begin(); cit != player[playerid].list_hand.end(); ++cit) for(auto cit = svector.begin(); cit != svector.end(); ++cit)
pduel->write_buffer32((*cit)->data.code); pduel->write_buffer32((*cit)->data.code);
core.shuffle_hand_check[playerid] = FALSE; core.shuffle_hand_check[playerid] = FALSE;
} else { } else {
...@@ -440,7 +449,7 @@ void field::shuffle(uint8 playerid, uint8 location) { ...@@ -440,7 +449,7 @@ void field::shuffle(uint8 playerid, uint8 location) {
pduel->write_buffer8(MSG_DECK_TOP); pduel->write_buffer8(MSG_DECK_TOP);
pduel->write_buffer8(playerid); pduel->write_buffer8(playerid);
pduel->write_buffer8(0); pduel->write_buffer8(0);
pduel->write_buffer32((*player[playerid].list_main.rbegin())->data.code); pduel->write_buffer32((*svector.rbegin())->data.code);
} }
} }
} }
......
...@@ -261,8 +261,7 @@ int32 scriptlib::group_is_exists(lua_State *L) { ...@@ -261,8 +261,7 @@ int32 scriptlib::group_is_exists(lua_State *L) {
uint32 extraargs = lua_gettop(L) - 4; uint32 extraargs = lua_gettop(L) - 4;
uint32 fcount = 0; uint32 fcount = 0;
uint32 result = FALSE; uint32 result = FALSE;
group::card_set::iterator it; for (auto it = pgroup->container.begin(); it != pgroup->container.end(); ++it) {
for (it = pgroup->container.begin(); it != pgroup->container.end(); ++it) {
if((*it) != pcard && pduel->lua->check_matching(*it, 2, extraargs)) { if((*it) != pcard && pduel->lua->check_matching(*it, 2, extraargs)) {
fcount++; fcount++;
if(fcount >= count) { if(fcount >= count) {
...@@ -285,9 +284,8 @@ int32 scriptlib::group_check_with_sum_equal(lua_State *L) { ...@@ -285,9 +284,8 @@ int32 scriptlib::group_check_with_sum_equal(lua_State *L) {
if(min == 0) if(min == 0)
min = 1; min = 1;
int32 extraargs = lua_gettop(L) - 4; int32 extraargs = lua_gettop(L) - 4;
field::card_set::iterator cit;
field::card_vector cv; field::card_vector cv;
for(cit = pgroup->container.begin(); cit != pgroup->container.end(); ++cit) { for(auto cit = pgroup->container.begin(); cit != pgroup->container.end(); ++cit) {
(*cit)->operation_param = pduel->lua->get_operation_value(*cit, 2, extraargs); (*cit)->operation_param = pduel->lua->get_operation_value(*cit, 2, extraargs);
cv.push_back(*cit); cv.push_back(*cit);
} }
......
--カース·サイキック
function c16678947.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_BATTLE_DESTROYED)
e1:SetHintTiming(TIMING_ATTACK,0x11e0)
e1:SetCondition(c16678947.condition)
e1:SetTarget(c16678947.target)
e1:SetOperation(c16678947.activate)
c:RegisterEffect(e1)
end
function c16678947.condition(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=eg:GetFirst()
local bc=tc:GetBattleTarget()
return tc:GetPreviousControler()==tp and tc:IsRace(RACE_PSYCHO) and bit.band(tc:GetBattlePosition(),POS_FACEUP)~=0
and bc:IsRelateToBattle() and bc:IsControler(1-tp) and bc==Duel.GetAttacker()
end
function c16678947.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
local tc=eg:GetFirst()
local bc=Duel.GetAttacker()
if chk==0 then return bc:IsCanBeEffectTarget(e) and bc:IsDestructable() end
local lv=tc:GetLevel()
e:SetLabel(lv)
Duel.SetTargetCard(bc)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,bc,1,0,0)
if lv~=0 then
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,lv*300)
end
end
function c16678947.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 then
Duel.Damage(1-tp,e:GetLabel()*300,REASON_EFFECT)
end
end
--デストラクト·ポーション
function c18739764.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_RECOVER)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c18739764.target)
e1:SetOperation(c18739764.activate)
c:RegisterEffect(e1)
end
function c18739764.filter(c)
return c:IsDestructable()
end
function c18739764.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c18739764.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c18739764.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c18739764.filter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
if g:GetFirst():IsFaceup() then
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,g:GetFirst():GetAttack())
end
end
function c18739764.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
local atk=tc:IsFaceup() and tc:GetAttack() or 0
if Duel.Destroy(tc,REASON_EFFECT)>0 and atk~=0 then
Duel.Recover(tp,atk,REASON_EFFECT)
end
end
end
--チェンジ·デステニー
function c24673894.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetCondition(c24673894.condition)
e1:SetTarget(c24673894.target)
e1:SetOperation(c24673894.activate)
c:RegisterEffect(e1)
end
function c24673894.condition(e,tp,eg,ep,ev,re,r,rp)
return tp~=Duel.GetTurnPlayer()
end
function c24673894.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local tg=Duel.GetAttacker()
if chkc then return chkc==tg end
if chk==0 then return tg:IsOnField() and tg:IsCanBeEffectTarget(e) end
Duel.SetTargetCard(tg)
end
function c24673894.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetAttacker()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and Duel.NegateAttack() and Duel.ChangePosition(tc,POS_FACEUP_DEFENCE)~=0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_CHANGE_POSITION)
e1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1)
local val=tc:GetAttack()/2
local op=Duel.SelectOption(1-tp,aux.Stringid(24673894,0),aux.Stringid(24673894,1))
if op==0 then Duel.Recover(1-tp,val,REASON_EFFECT)
else Duel.Damage(tp,val,REASON_EFFECT) end
end
end
--マシン·デベロッパー
function c25518020.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--atk up
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e2:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_MACHINE))
e2:SetValue(200)
c:RegisterEffect(e2)
--add counter
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetRange(LOCATION_SZONE)
e3:SetCode(EVENT_DESTROY)
e3:SetCondition(c25518020.ctcon)
e3:SetOperation(c25518020.ctop)
c:RegisterEffect(e3)
--special summon
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(25518020,0))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_SZONE)
e4:SetCost(c25518020.spcost)
e4:SetTarget(c25518020.sptg)
e4:SetOperation(c25518020.spop)
c:RegisterEffect(e4)
end
function c25518020.ctfilter(c)
return c:IsLocation(LOCATION_MZONE) and c:IsFaceup() and c:IsRace(RACE_MACHINE)
end
function c25518020.ctcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c25518020.ctfilter,1,nil)
end
function c25518020.ctop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():AddCounter(0x1d,2)
end
function c25518020.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
e:SetLabel(e:GetHandler():GetCounter(0x1d))
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end
function c25518020.filter(c,e,tp,lv)
return c:IsLevelBelow(lv) and c:IsRace(RACE_MACHINE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c25518020.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c25518020.filter(chkc,e,tp,e:GetLabel()) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c25518020.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp,e:GetHandler():GetCounter(0x1d)) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c25518020.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,e:GetLabel())
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c25518020.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
--蜘蛛の領域
function c26640671.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--target
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(26640671,0))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1)
e2:SetTarget(c26640671.target)
e2:SetOperation(c26640671.operation)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetRange(LOCATION_SZONE)
e3:SetCode(EVENT_BATTLE_END)
e3:SetOperation(c26640671.regop)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetRange(LOCATION_SZONE)
e4:SetCode(EVENT_PHASE+PHASE_BATTLE)
e4:SetCountLimit(1)
e4:SetOperation(c26640671.posop)
c:RegisterEffect(e4)
--poschange
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD)
e5:SetRange(LOCATION_SZONE)
e5:SetCode(EFFECT_CANNOT_CHANGE_POSITION)
e5:SetTargetRange(0,LOCATION_MZONE)
e5:SetTarget(c26640671.postg)
c:RegisterEffect(e5)
end
function c26640671.filter(c,ec)
return c:IsFaceup() and not ec:IsHasCardTarget(c) and c:IsRace(RACE_INSECT)
end
function c26640671.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c26640671.filter(chkc,e:GetHandler()) end
if chk==0 then return Duel.IsExistingTarget(c26640671.filter,tp,LOCATION_MZONE,0,1,nil,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c26640671.filter,tp,LOCATION_MZONE,0,1,1,nil,e:GetHandler())
end
function c26640671.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if not c:IsRelateToEffect(e) or not tc:IsRelateToEffect(e) or tc:IsFacedown() then return end
c:SetCardTarget(tc)
end
function c26640671.regop(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker()
local d=Duel.GetAttackTarget()
if d and d:IsControler(1-tp) and e:GetHandler():IsHasCardTarget(a) then
d:RegisterFlagEffect(26640671,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1)
elseif d and a:IsControler(1-tp) and e:GetHandler():IsHasCardTarget(d) then
a:RegisterFlagEffect(26640671,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1)
end
end
function c26640671.pfilter(c)
return c:GetFlagEffect(26640671)~=0 and c:IsAttack()
end
function c26640671.posop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c26640671.pfilter,tp,0,LOCATION_MZONE,nil)
Duel.ChangePosition(g,POS_FACEUP_DEFENCE)
local tc=g:GetFirst()
while tc do
tc:RegisterFlagEffect(26640672,RESET_EVENT+0x1fe0000,0,1)
tc=g:GetNext()
end
end
function c26640671.postg(e,c)
return c:GetFlagEffect(26640672)~=0
end
--ロケット·パイルダー
function c27863269.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(c27863269.target)
e1:SetOperation(c27863269.operation)
c:RegisterEffect(e1)
--indes
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetCondition(c27863269.indcon)
e2:SetValue(1)
c:RegisterEffect(e2)
--Equip limit
local e3=Effect.CreateEffect(c)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_EQUIP_LIMIT)
e3:SetValue(1)
c:RegisterEffect(e3)
--atkdown
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(27863269,0))
e4:SetCategory(CATEGORY_ATKCHANGE)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e4:SetRange(LOCATION_SZONE)
e4:SetCode(EVENT_DAMAGE_STEP_END)
e4:SetCondition(c27863269.atkcon)
e4:SetOperation(c27863269.atkop)
c:RegisterEffect(e4)
end
function c27863269.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function c27863269.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,e:GetHandler(),tc)
end
end
function c27863269.indcon(e)
return Duel.GetAttacker()==e:GetHandler():GetEquipTarget()
end
function c27863269.atkcon(e,tp,eg,ep,ev,re,r,rp)
local at=Duel.GetAttackTarget()
return at and at:IsRelateToBattle() and at:IsFaceup()
end
function c27863269.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local at=Duel.GetAttackTarget()
if not c:IsRelateToEffect(e) or not at:IsRelateToBattle() or at:IsFacedown() then return end
local atk=c:GetEquipTarget():GetAttack()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(-atk)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
at:RegisterEffect(e1)
end
--アドバンス·フォース
function c38589847.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--summon with 1 tribute
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(38589847,0))
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(LOCATION_HAND,0)
e2:SetCode(EFFECT_SUMMON_PROC)
e2:SetCondition(c38589847.otcon)
e2:SetTarget(c38589847.ottg)
e2:SetOperation(c38589847.otop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_SET_PROC)
c:RegisterEffect(e3)
end
function c38589847.otcon(e,c)
if c==nil then return true end
local g=Duel.GetTributeGroup(c)
return g:IsExists(Card.IsLevelAbove,1,nil,5)
end
function c38589847.ottg(e,c)
return c:IsLevelAbove(7)
end
function c38589847.otop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetTributeGroup(c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local sg=g:FilterSelect(tp,Card.IsLevelAbove,1,1,nil,5)
c:SetMaterial(sg)
Duel.Release(sg,REASON_SUMMON+REASON_MATERIAL)
end
--死神の呼び声
function c45133463.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(c45133463.condition)
e1:SetTarget(c45133463.target)
e1:SetOperation(c45133463.activate)
c:RegisterEffect(e1)
end
function c45133463.cfiltetr(c,tp)
return c:IsPreviousLocation(LOCATION_GRAVE) and c:GetPreviousControler(tp)
end
function c45133463.condition(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c45133463.cfiltetr,1,nil,tp)
end
function c45133463.filter(c,e,tp)
local code=c:GetCode()
return (code==78552773 or code==78275321) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c45133463.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c45133463.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c45133463.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c45133463.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c45133463.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
...@@ -22,6 +22,7 @@ function c56747793.initial_effect(c) ...@@ -22,6 +22,7 @@ function c56747793.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--Equip limit --Equip limit
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e4:SetType(EFFECT_TYPE_SINGLE) e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_EQUIP_LIMIT) e4:SetCode(EFFECT_EQUIP_LIMIT)
e4:SetValue(1) e4:SetValue(1)
......
--メテオ·プロミネンス
function c56856951.initial_effect(c)
--damage
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCategory(CATEGORY_DAMAGE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(c56856951.damcon)
e1:SetCost(c56856951.damcost)
e1:SetTarget(c56856951.damtg)
e1:SetOperation(c56856951.damop)
c:RegisterEffect(e1)
--salvage
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(56856951,0))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_PREDRAW)
e2:SetRange(LOCATION_GRAVE)
e2:SetCondition(c56856951.thcon)
e2:SetTarget(c56856951.thtg)
e2:SetOperation(c56856951.thop)
c:RegisterEffect(e2)
end
function c56856951.damcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetLP(1-tp)>3000
end
function c56856951.damcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,2,nil) end
Duel.DiscardHand(tp,Card.IsAbleToGraveAsCost,2,2,REASON_COST)
end
function c56856951.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(2000)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,2000)
end
function c56856951.damop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Damage(p,d,REASON_EFFECT)
end
function c56856951.thcon(e,tp,eg,ep,ev,re,r,rp)
return tp==Duel.GetTurnPlayer() and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0
end
function c56856951.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHand() end
local dt=Duel.GetDrawCount(tp)
if dt~=0 then
e:SetLabel(1)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_DRAW_COUNT)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_DRAW)
e1:SetValue(0)
Duel.RegisterEffect(e1,tp)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
else e:SetLabel(0) end
end
function c56856951.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if e:GetLabel()==1 and c:IsRelateToEffect(e) then
Duel.SendtoHand(c,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,c)
end
end
--ブレイク·ドロー
function c63851864.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(c63851864.target)
e1:SetOperation(c63851864.operation)
c:RegisterEffect(e1)
--Equip limit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_EQUIP_LIMIT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetValue(c63851864.eqlimit)
c:RegisterEffect(e2)
--draw
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(63851864,0))
e3:SetCategory(CATEGORY_DRAW)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_BATTLE_DESTROYING)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetRange(LOCATION_SZONE)
e3:SetCondition(c63851864.drcon)
e3:SetTarget(c63851864.drtg)
e3:SetOperation(c63851864.drop)
c:RegisterEffect(e3)
end
function c63851864.eqlimit(e,c)
return c:IsRace(RACE_MACHINE)
end
function c63851864.filter(c,tp)
return c:IsFaceup() and c:IsRace(RACE_MACHINE)
end
function c63851864.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c63851864.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c63851864.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c63851864.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
--destroy
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetRange(LOCATION_SZONE)
e1:SetOperation(c63851864.desop)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,5)
e:GetHandler():SetTurnCounter(0)
e:GetHandler():RegisterEffect(e1)
end
function c63851864.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,c,tc)
end
end
function c63851864.desop(e,tp,eg,ep,ev,re,r,rp)
if tp~=Duel.GetTurnPlayer() then return end
local c=e:GetHandler()
local ct=c:GetTurnCounter()
ct=ct+1
c:SetTurnCounter(ct)
if ct==3 then
Duel.Destroy(c,REASON_EFFECT)
end
end
function c63851864.drcon(e,tp,eg,ep,ev,re,r,rp)
local ec=eg:GetFirst()
local bc=ec:GetBattleTarget()
return e:GetHandler():GetEquipTarget()==eg:GetFirst() and ec:IsControler(tp)
and bc:IsLocation(LOCATION_GRAVE) and bc:IsReason(REASON_BATTLE)
end
function c63851864.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c63851864.drop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
--バラエティ·アウト
function c65196094.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c65196094.cost)
e1:SetTarget(c65196094.target)
e1:SetOperation(c65196094.activate)
c:RegisterEffect(e1)
if not c65196094.global_check then
c65196094.global_check=true
c65196094[0]=true
c65196094[1]=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_SPSUMMON)
ge1:SetOperation(c65196094.checkop)
Duel.RegisterEffect(ge1,0)
local ge2=Effect.CreateEffect(c)
ge2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge2:SetCode(EVENT_PHASE_START+PHASE_DRAW)
ge2:SetOperation(c65196094.clear)
Duel.RegisterEffect(ge2,0)
end
end
function c65196094.checkop(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
if tc:IsType(TYPE_SYNCHRO) then
c65196094[tc:GetControler()]=false
end
end
function c65196094.clear(e,tp,eg,ep,ev,re,r,rp)
c65196094[0]=true
c65196094[1]=true
end
function c65196094.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(1)
if chk==0 then return c65196094[tp] end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTargetRange(1,0)
e1:SetTarget(c65196094.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c65196094.splimit(e,c,tp,sumtp,sumpos)
return bit.band(sumtp,SUMMON_TYPE_SYNCHRO)==SUMMON_TYPE_SYNCHRO
end
function c65196094.cfilter(c,e,tp,g)
return c:IsFaceup() and c:IsType(TYPE_SYNCHRO) and c:IsAbleToExtraAsCost()
and g:CheckWithSumEqual(Card.GetLevel,c:GetLevel(),1)
end
function c65196094.spfilter(c,e,tp)
return c:IsType(TYPE_TUNER) and c:IsCanBeEffectTarget(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c65196094.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then
if e:GetLabel()==0 then return false end
e:SetLabel(0)
local spg=Duel.GetMatchingGroup(c65196094.spfilter,tp,LOCATION_GRAVE,0,nil,e,tp)
return Duel.IsExistingMatchingCard(c65196094.cfilter,tp,LOCATION_MZONE,0,1,nil,e,tp,spg)
end
e:SetLabel(0)
local spg=Duel.GetMatchingGroup(c65196094.spfilter,tp,LOCATION_GRAVE,0,nil,e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local cg=Duel.SelectMatchingCard(tp,c65196094.cfilter,tp,LOCATION_MZONE,0,1,1,nil,e,tp,spg)
local lv=cg:GetFirst():GetLevel()
Duel.SendtoDeck(cg,nil,0,REASON_COST)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=spg:SelectWithSumEqual(tp,Card.GetLevel,lv,1)
Duel.SetTargetCard(sg)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,sg,sg:GetCount(),0,0)
end
function c65196094.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if g:GetCount()==0 or g:GetCount()>Duel.GetLocationCount(tp,LOCATION_MZONE) then return end
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
--機械王-B.C.3000
function c70406920.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c70406920.cost)
e1:SetTarget(c70406920.target)
e1:SetOperation(c70406920.activate)
c:RegisterEffect(e1)
end
function c70406920.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.CheckSummonActivity(tp) and not Duel.CheckSpecialSummonActivity(tp) end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetLabelObject(e)
e1:SetTarget(c70406920.sumlimit)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e2:SetCode(EFFECT_CANNOT_SUMMON)
e2:SetReset(RESET_PHASE+PHASE_END)
e2:SetTargetRange(1,0)
Duel.RegisterEffect(e2,tp)
end
function c70406920.sumlimit(e,c,sump,sumtype,sumpos,targetp,se)
return e:GetLabelObject()~=se
end
function c70406920.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and
Duel.IsPlayerCanSpecialSummonMonster(tp,70406920,0,0x21,1000,1000,4,RACE_MACHINE,ATTRIBUTE_EARTH) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c70406920.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)==0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,70406920,0,0x21,1000,1000,4,RACE_MACHINE,ATTRIBUTE_EARTH) then return end
c:AddTrapMonsterAttribute(true,ATTRIBUTE_EARTH,RACE_MACHINE,4,1000,1000)
Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP)
c:TrapMonsterBlock()
--atkup
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(70406920,0))
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCost(c70406920.atkcost)
e1:SetOperation(c70406920.atkop)
e1:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e1)
end
function c70406920.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsRace,1,e:GetHandler(),RACE_MACHINE) end
local g=Duel.SelectReleaseGroup(tp,Card.IsRace,1,1,e:GetHandler(),RACE_MACHINE)
e:SetLabel(g:GetFirst():GetAttack())
Duel.Release(g,REASON_COST)
end
function c70406920.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFacedown() or not c:IsRelateToEffect(e) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(e:GetLabel())
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
--反転世界
function c79161790.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetCondition(c79161790.condition)
e1:SetTarget(c79161790.target)
e1:SetOperation(c79161790.activate)
c:RegisterEffect(e1)
end
function c79161790.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c79161790.filter(c)
return c:IsFaceup() and c:IsType(TYPE_EFFECT)
end
function c79161790.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c79161790.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
end
function c79161790.activate(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetMatchingGroup(c79161790.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
local c=e:GetHandler()
local tc=sg:GetFirst()
while tc do
local atk=tc:GetAttack()
local def=tc:GetDefence()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetValue(def)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_SET_DEFENCE_FINAL)
e2:SetReset(RESET_EVENT+0x1fe0000)
e2:SetValue(atk)
tc:RegisterEffect(e2)
tc=sg:GetNext()
end
end
--リフレクト·ネイチャー
function c83467607.initial_effect(c)
--reflect
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetOperation(c83467607.operation)
c:RegisterEffect(e1)
end
function c83467607.operation(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_REFLECT_DAMAGE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetValue(c83467607.refcon)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c83467607.refcon(e,re,val,r,rp,rc)
return re and not re:IsHasType(EFFECT_TYPE_CONTINUOUS) and rp~=e:GetOwnerPlayer()
end
...@@ -22,6 +22,7 @@ function c83746708.initial_effect(c) ...@@ -22,6 +22,7 @@ function c83746708.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--Equip limit --Equip limit
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e4:SetType(EFFECT_TYPE_SINGLE) e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_EQUIP_LIMIT) e4:SetCode(EFFECT_EQUIP_LIMIT)
e4:SetValue(1) e4:SetValue(1)
......
--シンクロ·コントロール
function c88289295.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_CONTROL)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,0x1c0)
e1:SetCondition(c88289295.condition)
e1:SetCost(c88289295.cost)
e1:SetTarget(c88289295.target)
e1:SetOperation(c88289295.activate)
c:RegisterEffect(e1)
end
function c88289295.condition(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil,TYPE_SYNCHRO)
end
function c88289295.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,1000) end
Duel.PayLPCost(tp,1000)
end
function c88289295.filter(c)
return c:IsFaceup() and c:IsType(TYPE_SYNCHRO) and c:IsControlerCanBeChanged()
end
function c88289295.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 c88289295.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c88289295.filter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g=Duel.SelectTarget(tp,c88289295.filter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0)
end
function c88289295.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) and not Duel.GetControl(tc,tp,PHASE_END,1) then
if not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then
Duel.Destroy(tc,REASON_EFFECT)
end
end
end
--太陽の祭壇
function c91468551.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--atk up
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(c91468551.atktg)
e2:SetValue(300)
c:RegisterEffect(e2)
end
function c91468551.atktg(e,c)
return bit.band(c:GetSummonType(),SUMMON_TYPE_SPECIAL) and c:IsPreviousLocation(LOCATION_GRAVE)
end
...@@ -390,3 +390,4 @@ ...@@ -390,3 +390,4 @@
!counter 0x1a 倍倍指示物 !counter 0x1a 倍倍指示物
!counter 0x1b 时计指示物 !counter 0x1b 时计指示物
!counter 0x1c D指示物 !counter 0x1c D指示物
!counter 0x1d 废品指示物
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