Commit b5972974 authored by argon.sun's avatar argon.sun

fix

parent fe4e9898
...@@ -2529,6 +2529,18 @@ int32 field::process_battle_command(uint16 step) { ...@@ -2529,6 +2529,18 @@ int32 field::process_battle_command(uint16 step) {
core.sub_attacker = 0; core.sub_attacker = 0;
core.sub_attack_target = (card*)0xffffffff; core.sub_attack_target = (card*)0xffffffff;
core.attack_state[infos.turn_player] = TRUE; core.attack_state[infos.turn_player] = TRUE;
pduel->write_buffer8(MSG_ATTACK);
pduel->write_buffer32(core.attacker->get_info_location());
if(core.attack_target) {
raise_single_event(core.attack_target, EVENT_BE_BATTLE_TARGET, 0, 0, 0, 1 - infos.turn_player, 0);
raise_event(core.attack_target, EVENT_BE_BATTLE_TARGET, 0, 0, 0, 1 - infos.turn_player, 0);
pduel->write_buffer32(core.attack_target->get_info_location());
} else
pduel->write_buffer32(0);
if(core.attacker->current.location != LOCATION_MZONE) {
core.units.begin()->step = -1;
return FALSE;
}
for(uint32 i = 0; i < 5; ++i) { for(uint32 i = 0; i < 5; ++i) {
if(player[1 - infos.turn_player].list_mzone[i]) if(player[1 - infos.turn_player].list_mzone[i])
core.pre_field[i] = player[1 - infos.turn_player].list_mzone[i]->fieldid; core.pre_field[i] = player[1 - infos.turn_player].list_mzone[i]->fieldid;
...@@ -2540,14 +2552,6 @@ int32 field::process_battle_command(uint16 step) { ...@@ -2540,14 +2552,6 @@ int32 field::process_battle_command(uint16 step) {
raise_single_event(core.attacker, EVENT_ATTACK_ANNOUNCE, 0, 0, 0, infos.turn_player, 0); raise_single_event(core.attacker, EVENT_ATTACK_ANNOUNCE, 0, 0, 0, infos.turn_player, 0);
raise_event(core.attacker, EVENT_ATTACK_ANNOUNCE, 0, 0, 0, infos.turn_player, 0); raise_event(core.attacker, EVENT_ATTACK_ANNOUNCE, 0, 0, 0, infos.turn_player, 0);
} }
pduel->write_buffer8(MSG_ATTACK);
pduel->write_buffer32(core.attacker->get_info_location());
if(core.attack_target) {
raise_single_event(core.attack_target, EVENT_BE_BATTLE_TARGET, 0, 0, 0, 1 - infos.turn_player, 0);
raise_event(core.attack_target, EVENT_BE_BATTLE_TARGET, 0, 0, 0, 1 - infos.turn_player, 0);
pduel->write_buffer32(core.attack_target->get_info_location());
} else
pduel->write_buffer32(0);
core.units.begin()->arg2 = (core.attacker->current.controler << 16) + core.attacker->fieldid; core.units.begin()->arg2 = (core.attacker->current.controler << 16) + core.attacker->fieldid;
process_single_event(); process_single_event();
process_instant_event(); process_instant_event();
......
...@@ -24,6 +24,7 @@ function c30757396.initial_effect(c) ...@@ -24,6 +24,7 @@ function c30757396.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EVENT_SSET) e2:SetCode(EVENT_SSET)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c30757396.damcon2)
e2:SetTarget(c30757396.damtg2) e2:SetTarget(c30757396.damtg2)
e2:SetOperation(c30757396.damop2) e2:SetOperation(c30757396.damop2)
c:RegisterEffect(e2) c:RegisterEffect(e2)
...@@ -42,6 +43,9 @@ function c30757396.damop(e,tp,eg,ep,ev,re,r,rp) ...@@ -42,6 +43,9 @@ function c30757396.damop(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD) local ct=Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD)
Duel.Damage(p,ct*300,REASON_EFFECT) Duel.Damage(p,ct*300,REASON_EFFECT)
end end
function c30757396.damcon2(e,tp,eg,ep,ev,re,r,rp)
return rp~=tp
end
function c30757396.damtg2(e,tp,eg,ep,ev,re,r,rp,chk) function c30757396.damtg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.SetTargetPlayer(1-tp) Duel.SetTargetPlayer(1-tp)
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
function c58601383.initial_effect(c) function c58601383.initial_effect(c)
--fusion material --fusion material
c:EnableReviveLimit() c:EnableReviveLimit()
aux.AddFusionProcCodeFun(c,97204936,aux.FilterBoolFunction(Card.IsType,TYPE_SYNCHRO),1,true,true) aux.AddFusionProcCodeFun(c,97204936,c58601383.ffilter,1,true,true)
--cannot be target --cannot be target
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
...@@ -22,6 +22,9 @@ function c58601383.initial_effect(c) ...@@ -22,6 +22,9 @@ function c58601383.initial_effect(c)
end end
c58601383.material_count=1 c58601383.material_count=1
c58601383.material={97204936} c58601383.material={97204936}
function c58601383.ffilter(c)
return c:IsType(TYPE_SYNCHRO) and not c:IsType(TYPE_EFFECT)
end
function c58601383.efilter(e,re) function c58601383.efilter(e,re)
return re:GetOwner():IsType(TYPE_EFFECT) return re:GetOwner():IsType(TYPE_EFFECT)
end end
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