Commit 747a0a64 authored by VanillaSalt's avatar VanillaSalt

fix

parent 778ef311
......@@ -4210,10 +4210,10 @@ int32 field::select_tribute_cards(int16 step, uint8 playerid, uint8 cancelable,
rmax += (*cit)->operation_param;
for(auto cit = core.release_cards_ex.begin(); cit != core.release_cards_ex.end(); ++cit)
rmax += (*cit)->operation_param;
core.temp_var[0] = 0;
if(rmax < min)
returns.ivalue[0] = TRUE;
else if(!core.release_cards_ex_sum.empty()) {
core.temp_var[0] = 0;
if(rmax == 0 && min == 2)
core.temp_var[0] = 1;
add_process(PROCESSOR_SELECT_YESNO, 0, 0, 0, playerid, 92);
......
......@@ -3098,7 +3098,7 @@ int32 field::process_battle_command(uint16 step) {
core.attacker->announced_cards[0] = 0;
core.attacker->announce_count++;
attack_all_target_check();
if(!atk_disabled) {
if(!core.attacker->is_status(STATUS_ATTACK_CANCELED)) {
if(core.attack_target)
core.attacker->attacked_cards[core.attack_target->fieldid_r] = core.attack_target;
else
......@@ -5168,11 +5168,18 @@ int32 field::adjust_step(uint16 step) {
return FALSE;
}
case 13: {
//attack cancel
card* attacker = core.attacker;
if(attacker && attacker->is_affected_by_effect(EFFECT_CANNOT_ATTACK))
attacker->set_status(STATUS_ATTACK_CANCELED, TRUE);
return FALSE;
}
case 14: {
raise_event((card*)0, EVENT_ADJUST, 0, 0, PLAYER_NONE, PLAYER_NONE, 0);
process_instant_event();
return FALSE;
}
case 14: {
case 15: {
if(core.re_adjust) {
core.units.begin()->step = -1;
return FALSE;
......
......@@ -27,7 +27,7 @@ end
function c16195942.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
if tc:IsFaceup() and tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then
local atk=tc:GetAttack()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......
......@@ -38,7 +38,7 @@ end
function c16304628.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() then
if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() and not tc:IsImmuneToEffect(e) then
local atk=tc:GetAttack()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......
......@@ -28,7 +28,7 @@ end
function c55727845.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsFaceup() then
if c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsFaceup() and not tc:IsImmuneToEffect(e) then
local atk=tc:GetAttack()/2
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......
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