Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add Effect.GetRange, IsHasRange #649

Merged
merged 6 commits into from
Nov 6, 2024
Merged

add Effect.GetRange, IsHasRange #649

merged 6 commits into from
Nov 6, 2024

Conversation

salix5
Copy link
Collaborator

@salix5 salix5 commented Oct 29, 2024

fix Effect.SetType

Explicitly set type for EFFECT_TYPE_ACTIVATE.
Explicitly set code, type for EFFECT_TYPE_FLIP.

simplify Effect functions

static int32 get_effect_property(lua_State* L, effect_member type);
static int32 is_effect_property(lua_State* L, effect_member type);

Effect.GetFieldID, GetCode, ...
Effect.IsHasCategory
Now they use the same function.

add Effect.GetRange, IsHasRange

「叛逆者エト」は1ターンに1度、以下の効果を持つモンスターカードが相手のフィールドか墓地に存在し、LPを半分払った場合のみ手札・墓地から特殊召喚できる。
●効果が発動した時にチェーンして手札かモンスターゾーンで発動する効果

effect filter:

function filter(e)
    return e:GetCode()==EVENT_CHAINING and e:IsHasType(EFFECT_TYPE_QUICK_O) and e:IsHasRange(LOCATION_HAND+LOCATION_MZONE)
end

@mercury233
@purerosefallen

@salix5 salix5 mentioned this pull request Nov 1, 2024
@salix5 salix5 mentioned this pull request Nov 3, 2024
@salix5 salix5 merged commit 59593ff into master Nov 6, 2024
1 check passed
@salix5 salix5 deleted the patch-effect branch November 6, 2024 11:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant