Commit 8774c043 authored by VanillaSalt's avatar VanillaSalt

fix

parent 11f110f7
...@@ -545,6 +545,8 @@ void Game::MainLoop() { ...@@ -545,6 +545,8 @@ void Game::MainLoop() {
driver->endScene(); driver->endScene();
if(closeSignal.Wait(0)) if(closeSignal.Wait(0))
CloseDuelWindow(); CloseDuelWindow();
if(!device->isWindowActive())
ignore_chain = false;
fps++; fps++;
cur_time = timer->getTime(); cur_time = timer->getTime();
if(cur_time < fps * 17 - 20) if(cur_time < fps * 17 - 20)
......
...@@ -224,6 +224,18 @@ uint32 card::get_code() { ...@@ -224,6 +224,18 @@ uint32 card::get_code() {
} }
return code; return code;
} }
uint32 card::get_another_code() {
effect_set eset;
filter_effect(EFFECT_ADD_CODE, &eset);
if(!eset.count)
return 0;
uint32 otcode = eset.get_last()->get_value(this);
if(get_code() != otcode)
return otcode;
if(data.alias == otcode)
return data.code;
return 0;
}
int32 card::is_set_card(uint32 set_code) { int32 card::is_set_card(uint32 set_code) {
uint32 code = get_code(); uint32 code = get_code();
uint32 setcode; uint32 setcode;
......
...@@ -132,6 +132,7 @@ public: ...@@ -132,6 +132,7 @@ public:
uint32 get_infos(byte* buf, int32 query_flag, int32 use_cache = TRUE); uint32 get_infos(byte* buf, int32 query_flag, int32 use_cache = TRUE);
uint32 get_info_location(); uint32 get_info_location();
uint32 get_code(); uint32 get_code();
uint32 get_another_code();
int32 is_set_card(uint32 set_code); int32 is_set_card(uint32 set_code);
uint32 get_type(); uint32 get_type();
int32 get_base_attack(uint8 swap = FALSE); int32 get_base_attack(uint8 swap = FALSE);
......
...@@ -262,6 +262,7 @@ public: ...@@ -262,6 +262,7 @@ public:
#define EFFECT_REVERSE_UPDATE 108 // #define EFFECT_REVERSE_UPDATE 108 //
#define EFFECT_SWAP_AD 109 // #define EFFECT_SWAP_AD 109 //
#define EFFECT_SWAP_BASE_AD 110 // #define EFFECT_SWAP_BASE_AD 110 //
#define EFFECT_ADD_CODE 113 //
#define EFFECT_CHANGE_CODE 114 // #define EFFECT_CHANGE_CODE 114 //
#define EFFECT_ADD_TYPE 115 // #define EFFECT_ADD_TYPE 115 //
#define EFFECT_REMOVE_TYPE 116 // #define EFFECT_REMOVE_TYPE 116 //
......
...@@ -1584,6 +1584,9 @@ int32 field::is_player_can_discard_deck_as_cost(uint8 playerid, int32 count) { ...@@ -1584,6 +1584,9 @@ int32 field::is_player_can_discard_deck_as_cost(uint8 playerid, int32 count) {
effect_set eset; effect_set eset;
filter_field_effect(EFFECT_TO_GRAVE_REDIRECT, &eset); filter_field_effect(EFFECT_TO_GRAVE_REDIRECT, &eset);
for(int32 i = 0; i < eset.count; ++i) { for(int32 i = 0; i < eset.count; ++i) {
uint32 redirect = eset[i]->get_value();
if((redirect & LOCATION_REMOVED) && player[playerid].list_main.back()->is_affected_by_effect(EFFECT_CANNOT_REMOVE))
continue;
uint8 p = eset[i]->get_handler_player(); uint8 p = eset[i]->get_handler_player();
if((eset[i]->flag & EFFECT_FLAG_IGNORE_RANGE) || (p == playerid && eset[i]->s_range & LOCATION_DECK) || (p != playerid && eset[i]->o_range & LOCATION_DECK)) if((eset[i]->flag & EFFECT_FLAG_IGNORE_RANGE) || (p == playerid && eset[i]->s_range & LOCATION_DECK) || (p != playerid && eset[i]->o_range & LOCATION_DECK))
return FALSE; return FALSE;
...@@ -1653,6 +1656,15 @@ int32 field::is_player_can_sset(uint8 playerid, card * pcard) { ...@@ -1653,6 +1656,15 @@ int32 field::is_player_can_sset(uint8 playerid, card * pcard) {
} }
return TRUE; return TRUE;
} }
int32 field::is_player_can_spsummon(uint8 playerid) {
effect_set eset;
filter_player_effect(playerid, EFFECT_CANNOT_SPECIAL_SUMMON, &eset);
for(int32 i = 0; i < eset.count; ++i) {
if(!eset[i]->target)
return FALSE;
}
return TRUE;
}
int32 field::is_player_can_spsummon(effect * peffect, uint32 sumtype, uint8 sumpos, uint8 playerid, uint8 toplayer, card * pcard) { int32 field::is_player_can_spsummon(effect * peffect, uint32 sumtype, uint8 sumpos, uint8 playerid, uint8 toplayer, card * pcard) {
effect_set eset; effect_set eset;
sumtype |= SUMMON_TYPE_SPECIAL; sumtype |= SUMMON_TYPE_SPECIAL;
......
...@@ -363,6 +363,7 @@ public: ...@@ -363,6 +363,7 @@ public:
int32 is_player_can_summon(uint32 sumtype, uint8 playerid, card* pcard); int32 is_player_can_summon(uint32 sumtype, uint8 playerid, card* pcard);
int32 is_player_can_mset(uint32 sumtype, uint8 playerid, card* pcard); int32 is_player_can_mset(uint32 sumtype, uint8 playerid, card* pcard);
int32 is_player_can_sset(uint8 playerid, card* pcard); int32 is_player_can_sset(uint8 playerid, card* pcard);
int32 is_player_can_spsummon(uint8 playerid);
int32 is_player_can_spsummon(effect* peffect, uint32 sumtype, uint8 sumpos, uint8 playerid, uint8 toplayer, card* pcard); int32 is_player_can_spsummon(effect* peffect, uint32 sumtype, uint8 sumpos, uint8 playerid, uint8 toplayer, card* pcard);
int32 is_player_can_flipsummon(uint8 playerid, card* pcard); int32 is_player_can_flipsummon(uint8 playerid, card* pcard);
int32 is_player_can_spsummon_monster(uint8 playerid, uint8 toplayer, uint8 sumpos, card_data* pdata); int32 is_player_can_spsummon_monster(uint8 playerid, uint8 toplayer, uint8 sumpos, card_data* pdata);
......
...@@ -18,6 +18,11 @@ int32 scriptlib::card_get_code(lua_State *L) { ...@@ -18,6 +18,11 @@ int32 scriptlib::card_get_code(lua_State *L) {
check_param(L, PARAM_TYPE_CARD, 1); check_param(L, PARAM_TYPE_CARD, 1);
card* pcard = *(card**) lua_touserdata(L, 1); card* pcard = *(card**) lua_touserdata(L, 1);
lua_pushinteger(L, pcard->get_code()); lua_pushinteger(L, pcard->get_code());
uint32 otcode = pcard->get_another_code();
if(otcode) {
lua_pushinteger(L, otcode);
return 2;
}
return 1; return 1;
} }
int32 scriptlib::card_get_origin_code(lua_State *L) { int32 scriptlib::card_get_origin_code(lua_State *L) {
...@@ -387,7 +392,7 @@ int32 scriptlib::card_is_code(lua_State *L) { ...@@ -387,7 +392,7 @@ int32 scriptlib::card_is_code(lua_State *L) {
check_param(L, PARAM_TYPE_CARD, 1); check_param(L, PARAM_TYPE_CARD, 1);
card* pcard = *(card**) lua_touserdata(L, 1); card* pcard = *(card**) lua_touserdata(L, 1);
uint32 tcode = lua_tointeger(L, 2); uint32 tcode = lua_tointeger(L, 2);
if(pcard->get_code() == tcode) if(pcard->get_code() == tcode || pcard->get_another_code() == tcode)
lua_pushboolean(L, 1); lua_pushboolean(L, 1);
else else
lua_pushboolean(L, 0); lua_pushboolean(L, 0);
......
...@@ -2694,19 +2694,24 @@ int32 scriptlib::duel_is_player_can_summon(lua_State * L) { ...@@ -2694,19 +2694,24 @@ int32 scriptlib::duel_is_player_can_summon(lua_State * L) {
return 1; return 1;
} }
int32 scriptlib::duel_is_player_can_spsummon(lua_State * L) { int32 scriptlib::duel_is_player_can_spsummon(lua_State * L) {
check_param_count(L, 4); check_param_count(L, 1);
int32 playerid = lua_tointeger(L, 1); int32 playerid = lua_tointeger(L, 1);
int32 sumtype = lua_tointeger(L, 2);
int32 sumpos = lua_tointeger(L, 3);
int32 toplayer = lua_tointeger(L, 4);
check_param(L, PARAM_TYPE_CARD, 5);
card* pcard = *(card**) lua_touserdata(L, 5);
if(playerid != 0 && playerid != 1) { if(playerid != 0 && playerid != 1) {
lua_pushboolean(L, 0); lua_pushboolean(L, 0);
return 1; return 1;
} }
duel* pduel = interpreter::get_duel_info(L); duel* pduel = interpreter::get_duel_info(L);
lua_pushboolean(L, pduel->game_field->is_player_can_spsummon(pduel->game_field->core.reason_effect, sumtype, sumpos, playerid, toplayer, pcard)); if(lua_gettop(L) == 1)
lua_pushboolean(L, pduel->game_field->is_player_can_spsummon(playerid));
else {
check_param_count(L, 5);
check_param(L, PARAM_TYPE_CARD, 5);
int32 sumtype = lua_tointeger(L, 2);
int32 sumpos = lua_tointeger(L, 3);
int32 toplayer = lua_tointeger(L, 4);
card* pcard = *(card**) lua_touserdata(L, 5);
lua_pushboolean(L, pduel->game_field->is_player_can_spsummon(pduel->game_field->core.reason_effect, sumtype, sumpos, playerid, toplayer, pcard));
}
return 1; return 1;
} }
int32 scriptlib::duel_is_player_can_flipsummon(lua_State * L) { int32 scriptlib::duel_is_player_can_flipsummon(lua_State * L) {
......
...@@ -2887,6 +2887,8 @@ int32 field::process_battle_command(uint16 step) { ...@@ -2887,6 +2887,8 @@ int32 field::process_battle_command(uint16 step) {
case 9: { case 9: {
if(returns.ivalue[0]) if(returns.ivalue[0])
core.units.begin()->step = 7; core.units.begin()->step = 7;
else
adjust_all();
return FALSE; return FALSE;
} }
case 10: { case 10: {
...@@ -2947,6 +2949,7 @@ int32 field::process_battle_command(uint16 step) { ...@@ -2947,6 +2949,7 @@ int32 field::process_battle_command(uint16 step) {
} }
core.units.begin()->step = -1; core.units.begin()->step = -1;
reset_phase(PHASE_DAMAGE); reset_phase(PHASE_DAMAGE);
adjust_all();
return FALSE; return FALSE;
} }
if((core.sub_attacker && core.sub_attacker->is_position(POS_FACEUP) && core.sub_attacker->current.location == LOCATION_MZONE) if((core.sub_attacker && core.sub_attacker->is_position(POS_FACEUP) && core.sub_attacker->current.location == LOCATION_MZONE)
......
...@@ -18,6 +18,13 @@ function c13857930.initial_effect(c) ...@@ -18,6 +18,13 @@ function c13857930.initial_effect(c)
e3:SetTarget(c13857930.target) e3:SetTarget(c13857930.target)
e3:SetOperation(c13857930.activate) e3:SetOperation(c13857930.activate)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--add code
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e4:SetCode(EFFECT_ADD_CODE)
e4:SetValue(17732278)
c:RegisterEffect(e4)
end end
function c13857930.condition(e,tp,eg,ep,ev,re,r,rp) function c13857930.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler()==Duel.GetAttacker() or e:GetHandler()==Duel.GetAttackTarget() return e:GetHandler()==Duel.GetAttacker() or e:GetHandler()==Duel.GetAttackTarget()
......
...@@ -11,12 +11,12 @@ function c1539051.initial_effect(c) ...@@ -11,12 +11,12 @@ function c1539051.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c1539051.gfilter(c) function c1539051.gfilter(c)
return c:IsFaceup() and c:IsSetCard(0x1f) and c:IsType(TYPE_MONSTER) return c:IsFaceup() and c:IsSetCard(0x1f)
end end
function c1539051.target(e,tp,eg,ep,ev,re,r,rp,chk) function c1539051.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
local g=Duel.GetMatchingGroup(c1539051.gfilter,tp,LOCATION_MZONE,0,nil) local g=Duel.GetMatchingGroup(c1539051.gfilter,tp,LOCATION_MZONE,0,nil)
local ct=g:GetClassCount(Card.GetCode) local ct=c1539051.count_unique_code(g)
e:SetLabel(ct) e:SetLabel(ct)
return ct>0 and Duel.IsPlayerCanDraw(tp,ct) return ct>0 and Duel.IsPlayerCanDraw(tp,ct)
end end
...@@ -27,6 +27,21 @@ end ...@@ -27,6 +27,21 @@ end
function c1539051.activate(e,tp,eg,ep,ev,re,r,rp) function c1539051.activate(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
local g=Duel.GetMatchingGroup(c1539051.gfilter,tp,LOCATION_MZONE,0,nil) local g=Duel.GetMatchingGroup(c1539051.gfilter,tp,LOCATION_MZONE,0,nil)
local ct=g:GetClassCount(Card.GetCode) local ct=c1539051.count_unique_code(g)
Duel.Draw(p,ct,REASON_EFFECT) Duel.Draw(p,ct,REASON_EFFECT)
end end
function c1539051.count_unique_code(g)
local check={}
local count=0
local tc=g:GetFirst()
while tc do
for i,code in ipairs({tc:GetCode()}) do
if not check[code] then
check[code]=true
count=count+1
end
end
tc=g:GetNext()
end
return count
end
...@@ -29,6 +29,6 @@ function c16135253.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -29,6 +29,6 @@ function c16135253.operation(e,tp,eg,ep,ev,re,r,rp)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(16135253,1)) then if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(16135253,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil) local sg=g:Select(tp,1,1,nil)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP_ATTACK) Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end end
end end
...@@ -26,9 +26,9 @@ function c16556849.filter(c,atk) ...@@ -26,9 +26,9 @@ function c16556849.filter(c,atk)
end end
function c16556849.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c16556849.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c16556849.filter(chkc,e:GetHandler():GetAttack()) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and c16556849.filter(chkc,e:GetHandler():GetAttack()) end
if chk==0 then return Duel.IsExistingTarget(c16556849.filter,tp,0,LOCATION_MZONE,1,nil,e:GetHandler():GetAttack()) end if chk==0 then return Duel.IsExistingTarget(c16556849.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,e:GetHandler():GetAttack()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c16556849.filter,tp,0,LOCATION_MZONE,1,1,nil,e:GetHandler():GetAttack()) local g=Duel.SelectTarget(tp,c16556849.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,e:GetHandler():GetAttack())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end end
function c16556849.op(e,tp,eg,ep,ev,re,r,rp) function c16556849.op(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -5,6 +5,7 @@ function c20858318.initial_effect(c) ...@@ -5,6 +5,7 @@ function c20858318.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(c20858318.con) e1:SetCondition(c20858318.con)
e1:SetTarget(c20858318.tg)
e1:SetOperation(c20858318.op) e1:SetOperation(c20858318.op)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
...@@ -18,11 +19,13 @@ function c20858318.con(e,tp,eg,ep,ev,re,r,rp) ...@@ -18,11 +19,13 @@ function c20858318.con(e,tp,eg,ep,ev,re,r,rp)
and Duel.IsExistingMatchingCard(c20858318.cfilter,tp,LOCATION_MZONE,0,1,nil,48768179) and Duel.IsExistingMatchingCard(c20858318.cfilter,tp,LOCATION_MZONE,0,1,nil,48768179)
and Duel.IsExistingMatchingCard(c20858318.cfilter,tp,LOCATION_MZONE,0,1,nil,74153887) and Duel.IsExistingMatchingCard(c20858318.cfilter,tp,LOCATION_MZONE,0,1,nil,74153887)
end end
function c20858318.filter(c) function c20858318.tg(e,tp,eg,ep,ev,re,r,rp,chk)
return c:IsFaceup() and c:IsSetCard(0x1a) if chk==0 then return true end
local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,0)
Duel.SetTargetCard(g)
end end
function c20858318.op(e,tp,eg,ep,ev,re,r,rp) function c20858318.op(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c20858318.filter,tp,LOCATION_MZONE,0,nil) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
local tc=g:GetFirst() local tc=g:GetFirst()
while tc do while tc do
tc:RegisterFlagEffect(20858318,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) tc:RegisterFlagEffect(20858318,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1)
...@@ -41,7 +44,7 @@ function c20858318.op(e,tp,eg,ep,ev,re,r,rp) ...@@ -41,7 +44,7 @@ function c20858318.op(e,tp,eg,ep,ev,re,r,rp)
e2:SetCondition(c20858318.rdcon) e2:SetCondition(c20858318.rdcon)
e2:SetOperation(c20858318.rdop) e2:SetOperation(c20858318.rdop)
e2:SetReset(RESET_PHASE+PHASE_END) e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp) Duel.RegisterEffect(e2,tp)
end end
function c20858318.affected(e,c) function c20858318.affected(e,c)
return c:GetFlagEffect(20858318)~=0 return c:GetFlagEffect(20858318)~=0
......
--ライフ·ストリーム·ドラゴン --ライフ·ストリーム·ドラゴン
function c25165047.initial_effect(c) function c25165047.initial_effect(c)
--synchro summon --synchro summon
aux.AddSynchroProcedure(c,nil,aux.FilterBoolFunction(Card.IsCode,2403771),1) aux.AddSynchroProcedure2(c,nil,aux.FilterBoolFunction(Card.IsCode,2403771))
c:EnableReviveLimit() c:EnableReviveLimit()
--change lp --change lp
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
......
...@@ -25,7 +25,7 @@ function c27770341.initial_effect(c) ...@@ -25,7 +25,7 @@ function c27770341.initial_effect(c)
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) e4:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e4:SetCode(EVENT_DISCARD) e4:SetCode(EVENT_DISCARD)
e4:SetOperation(c27770341.addcount1) e4:SetOperation(c27770341.addcount)
Duel.RegisterEffect(e4,0) Duel.RegisterEffect(e4,0)
end end
end end
...@@ -34,19 +34,15 @@ function c27770341.resetcount(e,tp,eg,ep,ev,re,r,rp) ...@@ -34,19 +34,15 @@ function c27770341.resetcount(e,tp,eg,ep,ev,re,r,rp)
c27770341[1]=0 c27770341[1]=0
end end
function c27770341.addcount(e,tp,eg,ep,ev,re,r,rp) function c27770341.addcount(e,tp,eg,ep,ev,re,r,rp)
local c=eg:GetFirst() local tc=eg:GetFirst()
while c~=nil do while tc do
local p=c:GetControler() local p=tc:GetReasonPlayer()
if c:GetPreviousRaceOnField()==RACE_DRAGON then c27770341[p]=c27770341[p]+1 end local pl=tc:GetPreviousLocation()
c=eg:GetNext() if (pl==LOCATION_MZONE and tc:GetPreviousRaceOnField()==RACE_DRAGON)
end or (pl==LOCATION_HAND and tc:GetOriginalRace()==RACE_DRAGON) then
end c27770341[p]=c27770341[p]+1
function c27770341.addcount1(e,tp,eg,ep,ev,re,r,rp) end
local c=eg:GetFirst() tc=eg:GetNext()
while c~=nil do
local p=c:GetControler()
if c:GetOriginalRace()==RACE_DRAGON then c27770341[p]=c27770341[p]+1 end
c=eg:GetNext()
end end
end end
function c27770341.activate(e,tp,eg,ep,ev,re,r,rp) function c27770341.activate(e,tp,eg,ep,ev,re,r,rp)
......
--焔紫竜ピュラリス --焔紫竜ピュラリス
function c37038993.initial_effect(c) function c37038993.initial_effect(c)
--synchro summon --synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1) aux.AddSynchroProcedure2(c,nil,aux.NonTuner(nil))
c:EnableReviveLimit() c:EnableReviveLimit()
--synchro summon success --synchro summon success
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
......
...@@ -4,12 +4,16 @@ function c43040603.initial_effect(c) ...@@ -4,12 +4,16 @@ function c43040603.initial_effect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(c43040603.condition)
e1:SetCost(c43040603.cost) e1:SetCost(c43040603.cost)
e1:SetTarget(c43040603.target) e1:SetTarget(c43040603.target)
e1:SetOperation(c43040603.operation) e1:SetOperation(c43040603.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c43040603.filter(c,e,tp) function c43040603.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsPlayerCanSpecialSummon(tp)
end
function c43040603.filter(c)
return c:IsSummonableCard() return c:IsSummonableCard()
end end
function c43040603.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c43040603.cost(e,tp,eg,ep,ev,re,r,rp,chk)
...@@ -19,7 +23,7 @@ function c43040603.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -19,7 +23,7 @@ function c43040603.cost(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c43040603.target(e,tp,eg,ep,ev,re,r,rp,chk) function c43040603.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
and Duel.IsExistingMatchingCard(c43040603.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(c43040603.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_DECK)
end end
function c43040603.operation(e,tp,eg,ep,ev,re,r,rp) function c43040603.operation(e,tp,eg,ep,ev,re,r,rp)
......
--フォーミュラ·シンクロン --フォーミュラ·シンクロン
function c50091196.initial_effect(c) function c50091196.initial_effect(c)
--synchro summon --synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1) aux.AddSynchroProcedure2(c,nil,aux.NonTuner(nil))
c:EnableReviveLimit() c:EnableReviveLimit()
--synchro summon success --synchro summon success
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
......
...@@ -46,20 +46,21 @@ function c54704216.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -46,20 +46,21 @@ function c54704216.operation(e,tp,eg,ep,ev,re,r,rp)
c:CreateRelation(tc,RESET_EVENT+0x1fe0000) c:CreateRelation(tc,RESET_EVENT+0x1fe0000)
e:GetLabelObject():SetLabelObject(tc) e:GetLabelObject():SetLabelObject(tc)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_OWNER_RELATE+EFFECT_FLAG_SINGLE_RANGE) e1:SetRange(LOCATION_SZONE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_CANNOT_ATTACK) e1:SetCode(EFFECT_CANNOT_ATTACK)
e1:SetReset(RESET_EVENT+0x1fc0000) e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e1:SetCondition(c54704216.rcon) e1:SetTarget(c54704216.efftg)
tc:RegisterEffect(e1,true) e1:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e1)
local e2=e1:Clone() local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_CHANGE_POSITION) e2:SetCode(EFFECT_CANNOT_CHANGE_POSITION)
tc:RegisterEffect(e2,true) e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
c:RegisterEffect(e2)
end end
end end
function c54704216.rcon(e) function c54704216.efftg(e,c)
return e:GetOwner():IsRelateToCard(e:GetHandler()) return e:GetHandler():IsRelateToCard(c)
end end
function c54704216.descon(e,tp,eg,ep,ev,re,r,rp) function c54704216.descon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -20,7 +20,7 @@ end ...@@ -20,7 +20,7 @@ end
function c5818294.negcon(e,tp,eg,ep,ev,re,r,rp) function c5818294.negcon(e,tp,eg,ep,ev,re,r,rp)
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
return g and g:IsExists(c5818294.tfilter,1,nil,tp) return g and g:IsExists(c5818294.tfilter,1,nil,tp) and Duel.IsChainDisablable(ev)
end end
function c5818294.negcost(e,tp,eg,ep,ev,re,r,rp,chk) function c5818294.negcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
......
...@@ -4,16 +4,20 @@ function c58577036.initial_effect(c) ...@@ -4,16 +4,20 @@ function c58577036.initial_effect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(c58577036.condition)
e1:SetTarget(c58577036.target) e1:SetTarget(c58577036.target)
e1:SetOperation(c58577036.operation) e1:SetOperation(c58577036.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c58577036.filter(c,e,tp) function c58577036.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsPlayerCanSpecialSummon(tp)
end
function c58577036.filter(c)
return c:IsSummonableCard() return c:IsSummonableCard()
end end
function c58577036.target(e,tp,eg,ep,ev,re,r,rp,chk) function c58577036.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c58577036.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(c58577036.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_DECK)
end end
function c58577036.operation(e,tp,eg,ep,ev,re,r,rp) function c58577036.operation(e,tp,eg,ep,ev,re,r,rp)
......
--TG レシプロ·ドラゴン·フライ --TG レシプロ·ドラゴン·フライ
function c62560742.initial_effect(c) function c62560742.initial_effect(c)
--synchro summon --synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1) aux.AddSynchroProcedure2(c,nil,aux.NonTuner(nil))
c:EnableReviveLimit() c:EnableReviveLimit()
--special summon --special summon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
......
...@@ -13,17 +13,16 @@ function c62701967.initial_effect(c) ...@@ -13,17 +13,16 @@ function c62701967.initial_effect(c)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(62701967,0)) e2:SetDescription(aux.Stringid(62701967,0))
e2:SetCategory(CATEGORY_ATKCHANGE) e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_BATTLE_DESTROYED) e2:SetCode(EVENT_BATTLE_DESTROYING)
e2:SetRange(LOCATION_MZONE)
e2:SetLabel(300) e2:SetLabel(300)
e2:SetCondition(c62701967.atkcon) e2:SetCondition(c62701967.atkcon)
e2:SetOperation(c62701967.operation) e2:SetOperation(c62701967.operation)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c62701967.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) function c62701967.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsRace,1,nil,RACE_DINOSAUR) end if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsRace,1,e:GetHandler(),RACE_DINOSAUR) end
local sg=Duel.SelectReleaseGroup(tp,Card.IsRace,1,1,nil,RACE_DINOSAUR) local sg=Duel.SelectReleaseGroup(tp,Card.IsRace,1,1,e:GetHandler(),RACE_DINOSAUR)
Duel.Release(sg,REASON_COST) Duel.Release(sg,REASON_COST)
end end
function c62701967.operation(e,tp,eg,ep,ev,re,r,rp) function c62701967.operation(e,tp,eg,ep,ev,re,r,rp)
...@@ -38,7 +37,8 @@ function c62701967.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -38,7 +37,8 @@ function c62701967.operation(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c62701967.atkcon(e,tp,eg,ep,ev,re,r,rp) function c62701967.atkcon(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst() local c=e:GetHandler()
return eg:GetCount()==1 and tc:GetReasonCard()==e:GetHandler() local bc=c:GetBattleTarget()
and tc:IsLocation(LOCATION_GRAVE) and tc:IsReason(REASON_BATTLE) return c:IsFaceup() and c:IsRelateToBattle()
and bc:IsLocation(LOCATION_GRAVE) and bc:IsReason(REASON_BATTLE) and bc:IsType(TYPE_MONSTER)
end end
...@@ -31,8 +31,8 @@ end ...@@ -31,8 +31,8 @@ end
function c63583431.cfilter(c) function c63583431.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x59) return c:IsFaceup() and c:IsSetCard(0x59)
end end
function c63583431.damcon(e,tp,eg,ep,ev,re,r,rp) function c63583431.damcon(e)
return Duel.IsExistingMatchingCard(c63583431.cfilter,tp,LOCATION_MZONE,0,2,nil) return Duel.IsExistingMatchingCard(c63583431.cfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,2,nil)
end end
function c63583431.damval(e,re,val,r,rp,rc) function c63583431.damval(e,re,val,r,rp,rc)
if bit.band(r,REASON_EFFECT)~=0 then return 0 end if bit.band(r,REASON_EFFECT)~=0 then return 0 end
......
...@@ -19,7 +19,7 @@ function c70630741.initial_effect(c) ...@@ -19,7 +19,7 @@ function c70630741.initial_effect(c)
end end
function c70630741.condition(e,tp,eg,ep,ev,re,r,rp) function c70630741.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return c:IsLocation(LOCATION_GRAVE) and c:IsReason(REASON_BATTLE) return not c:IsLocation(LOCATION_DECK) and c:IsReason(REASON_BATTLE)
end end
function c70630741.filter(c,tp) function c70630741.filter(c,tp)
return c:IsFaceup() and c:GetOwner()==tp and c:IsControlerCanBeChanged() return c:IsFaceup() and c:GetOwner()==tp and c:IsControlerCanBeChanged()
......
--神海竜ギシルノドン --神海竜ギシルノドン
function c76891401.initial_effect(c) function c76891401.initial_effect(c)
--synchro summon --synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(c76891401.synfilter),1) aux.AddSynchroProcedure2(c,nil,aux.NonTuner(c76891401.synfilter))
c:EnableReviveLimit() c:EnableReviveLimit()
--atk change --atk change
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
......
...@@ -17,6 +17,13 @@ function c78734254.initial_effect(c) ...@@ -17,6 +17,13 @@ function c78734254.initial_effect(c)
e2:SetTarget(c78734254.target) e2:SetTarget(c78734254.target)
e2:SetOperation(c78734254.activate) e2:SetOperation(c78734254.activate)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--add code
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e4:SetCode(EFFECT_ADD_CODE)
e4:SetValue(17955766)
c:RegisterEffect(e4)
end end
function c78734254.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c78734254.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
......
--μϪ --異界の棘紫獣
function c80208323.initial_effect(c) function c80208323.initial_effect(c)
--special summon --special summon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
...@@ -18,7 +18,7 @@ function c80208323.spfilter(c,tp) ...@@ -18,7 +18,7 @@ function c80208323.spfilter(c,tp)
return c:IsLocation(LOCATION_GRAVE) and c:IsReason(REASON_BATTLE) and c:GetPreviousControler()==tp and c:IsType(TYPE_MONSTER) return c:IsLocation(LOCATION_GRAVE) and c:IsReason(REASON_BATTLE) and c:GetPreviousControler()==tp and c:IsType(TYPE_MONSTER)
end end
function c80208323.spcon(e,tp,eg,ep,ev,re,r,rp) function c80208323.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c80208323.spfilter,1,nil,tp) return not eg:IsContains(e:GetHandler()) and eg:IsExists(c80208323.spfilter,1,nil,tp)
end end
function c80208323.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function c80208323.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,80208323)==0 end if chk==0 then return Duel.GetFlagEffect(tp,80208323)==0 end
......
...@@ -18,7 +18,7 @@ end ...@@ -18,7 +18,7 @@ end
function c80368942.target(e,tp,eg,ep,ev,re,r,rp,chk) function c80368942.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
local g=Duel.GetMatchingGroup(c80368942.gfilter,tp,LOCATION_GRAVE,0,nil) local g=Duel.GetMatchingGroup(c80368942.gfilter,tp,LOCATION_GRAVE,0,nil)
local ct=g:GetClassCount(Card.GetOriginalCode) local ct=c80368942.count_unique_code(g)
e:SetLabel(ct) e:SetLabel(ct)
return ct>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>=ct return ct>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>=ct
and Duel.IsExistingMatchingCard(c80368942.spfilter,tp,LOCATION_DECK,0,ct,nil,e,tp) and Duel.IsExistingMatchingCard(c80368942.spfilter,tp,LOCATION_DECK,0,ct,nil,e,tp)
...@@ -27,7 +27,7 @@ function c80368942.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -27,7 +27,7 @@ function c80368942.target(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c80368942.activate(e,tp,eg,ep,ev,re,r,rp) function c80368942.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c80368942.gfilter,tp,LOCATION_GRAVE,0,nil) local g=Duel.GetMatchingGroup(c80368942.gfilter,tp,LOCATION_GRAVE,0,nil)
local ct=g:GetClassCount(Card.GetOriginalCode) local ct=c80368942.count_unique_code(g)
if ct==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)<ct then return end if ct==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)<ct then return end
local sg=Duel.GetMatchingGroup(c80368942.spfilter,tp,LOCATION_DECK,0,nil,e,tp) local sg=Duel.GetMatchingGroup(c80368942.spfilter,tp,LOCATION_DECK,0,nil,e,tp)
if sg:GetCount()<ct then return end if sg:GetCount()<ct then return end
...@@ -35,3 +35,18 @@ function c80368942.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -35,3 +35,18 @@ function c80368942.activate(e,tp,eg,ep,ev,re,r,rp)
local spg=sg:Select(tp,ct,ct,nil) local spg=sg:Select(tp,ct,ct,nil)
Duel.SpecialSummon(spg,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(spg,0,tp,tp,false,false,POS_FACEUP)
end end
function c80368942.count_unique_code(g)
local check={}
local count=0
local tc=g:GetFirst()
while tc do
for i,code in ipairs({tc:GetCode()}) do
if not check[code] then
check[code]=true
count=count+1
end
end
tc=g:GetNext()
end
return count
end
--Sin パラドクス·ドラゴン --Sin パラドクス·ドラゴン
function c8310162.initial_effect(c) function c8310162.initial_effect(c)
--synchro summon --synchro summon
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsCode,74509280),aux.NonTuner(Card.IsSetCard,0x23),1) aux.AddSynchroProcedure2(c,aux.FilterBoolFunction(Card.IsCode,74509280),aux.NonTuner(Card.IsSetCard,0x23))
c:EnableReviveLimit() c:EnableReviveLimit()
c:SetUniqueOnField(1,1,8310162) c:SetUniqueOnField(1,1,8310162)
--special summon --special summon
......
...@@ -14,7 +14,7 @@ function c87043568.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -14,7 +14,7 @@ function c87043568.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil) Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end end
function c87043568.operation(e,tp,eg,ep,ev,re,r,rp) function c87043568.operation(e,tp,eg,ep,ev,re,r,rp)
...@@ -55,7 +55,9 @@ function c87043568.eqlimit(e,c) ...@@ -55,7 +55,9 @@ function c87043568.eqlimit(e,c)
end end
function c87043568.atkcon(e,tp,eg,ep,ev,re,r,rp) function c87043568.atkcon(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker() local a=Duel.GetAttacker()
local ph=Duel.GetCurrentPhase()
return a==e:GetHandler():GetEquipTarget() return a==e:GetHandler():GetEquipTarget()
and (ph==PHASE_DAMAGE or ph==PHASE_DAMAGE_CAL) and not Duel.IsDamageCalculated()
end end
function c87043568.cfilter(c) function c87043568.cfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAttackBelow(1000) and c:IsAbleToGraveAsCost() return c:IsType(TYPE_MONSTER) and c:IsAttackBelow(1000) and c:IsAbleToGraveAsCost()
......
...@@ -32,7 +32,9 @@ function c88289295.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -32,7 +32,9 @@ function c88289295.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function c88289295.activate(e,tp,eg,ep,ev,re,r,rp) function c88289295.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) and not Duel.GetControl(tc,tp,PHASE_END,1) then local ct=1
if Duel.GetTurnPlayer()~=tp then ct=2 end
if tc:IsFaceup() and tc:IsRelateToEffect(e) and not Duel.GetControl(tc,tp,PHASE_END,ct) then
if not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then if not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then
Duel.Destroy(tc,REASON_EFFECT) Duel.Destroy(tc,REASON_EFFECT)
end end
......
...@@ -46,18 +46,18 @@ function c88341502.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -46,18 +46,18 @@ function c88341502.activate(e,tp,eg,ep,ev,re,r,rp)
e3:SetReset(RESET_PHASE+PHASE_END) e3:SetReset(RESET_PHASE+PHASE_END)
e3:SetLabelObject(tc) e3:SetLabelObject(tc)
Duel.RegisterEffect(e3,tp) Duel.RegisterEffect(e3,tp)
tc:RegisterFlagEffect(88341502,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) tc:RegisterFlagEffect(88341502,RESET_EVENT+0x1020000+RESET_PHASE+PHASE_END,0,1)
end end
end end
function c88341502.damcon(e,tp,eg,ep,ev,re,r,rp) function c88341502.damcon(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst() local tc=e:GetLabelObject()
local bc=tc:GetBattleTarget() local bc=tc:GetBattleTarget()
return tc==e:GetLabelObject() and tc:IsRelateToBattle() and tc:GetFlagEffect(88341502)~=0 return eg:IsContains(tc) and tc:GetFlagEffect(88341502)~=0
and bc:IsLocation(LOCATION_GRAVE) and bc:IsReason(REASON_BATTLE) and bc:IsLocation(LOCATION_GRAVE) and bc:IsReason(REASON_BATTLE)
end end
function c88341502.damtg(e,tp,eg,ep,ev,re,r,rp,chk) function c88341502.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
local def=eg:GetFirst():GetBattleTarget():GetBaseDefence() local def=e:GetLabelObject():GetBattleTarget():GetBaseDefence()
if def<0 then def=0 end if def<0 then def=0 end
Duel.SetTargetPlayer(1-tp) Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(def) Duel.SetTargetParam(def)
......
...@@ -352,6 +352,7 @@ EFFECT_SET_BASE_DEFENCE =107 -- ...@@ -352,6 +352,7 @@ EFFECT_SET_BASE_DEFENCE =107 --
EFFECT_REVERSE_UPDATE =108 -- EFFECT_REVERSE_UPDATE =108 --
EFFECT_SWAP_AD =109 -- EFFECT_SWAP_AD =109 --
EFFECT_SWAP_BASE_AD =110 -- EFFECT_SWAP_BASE_AD =110 --
EFFECT_ADD_CODE =113 --
EFFECT_CHANGE_CODE =114 -- EFFECT_CHANGE_CODE =114 --
EFFECT_ADD_TYPE =115 -- EFFECT_ADD_TYPE =115 --
EFFECT_REMOVE_TYPE =116 -- EFFECT_REMOVE_TYPE =116 --
......
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