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

Renaming script functions for better understanding and less clunkiness #90

Open
kevinlul opened this issue Nov 9, 2019 · 11 comments
Open
Assignees
Labels
enhancement Internal implementation improvements

Comments

@kevinlul
Copy link
Contributor

kevinlul commented Nov 9, 2019

EDIT: These are now on the rename-lua branch, thank you Yamato.

Card.IsDirectAttacked -> Card.HasAttackedDirectly
Card.IsHasCardTarget -> Card.HasCardAsTarget
Card.IsRelateToEffect -> Card.IsRelatedToEffect
Card.IsRelateToChain -> Card.IsRelatedToChain
Card.IsRelateToCard -> Card.IsRelatedToCard
Card.IsRelateToBattle -> Card.IsRelatedToBattle
Card.IsDestructable -> Card.CanBeDestroyed
Card.IsSummonableCard -> Card.CanBeNormalSummonSet
Card.IsSummonable -> Card.CanBeNormalSummoned
Card.IsXSummonableCard -> Card.CanBeXSummoned
Card.IsSpecialSummonable -> Card.IsSpecialSummonMonster
Card.IsCanBeSpecialSummoned -> Card.CanBeSpecialSummoned
Card.IsReleasable -> Card.CanBeTributed
Card.IsReleasableByEffect -> Card.CanBeTributedByEffect
Card.IsDiscardable -> Card.CanBeDiscarded
Card.IsAbleToChangeControler -> CanChangeController
Card.IsControlerCanBeChanged -> CanControllerBeChanged
Card.IsCanChangePosition -> Card.CanChangePosition
Card.IsCanTurnSet -> Card.CanBeFlippedSet
Card.IsCanAddCounter -> Card.CanHoldCounter
Card.IsCanRemoveCounter -> Card.CanRemoveCounter
Card.IsCanBeFusionMaterial -> Card.CanBeXMaterial
Card.IsCanBeMaterial -> Card.CanBeMaterial
Card.IsCanBeEffectTarget -> Card.CanBeTargetedByEffect
Card.IsCanBeBattleTarget -> Card.CanBeTargetedByAttack
Card.GetOwnerTarget -> Card.GetAbsoluteTargetGroup
Card.GetOwnerTargetCount -> Card.GetAbsoluteTargetGroupCount

Duel.IsPlayerCanDraw -> Duel.CanPlayerDraw
Duel.IsPlayerCanDiscardDeck -> Duel.CanPlayerDiscardDeck
Duel.IsPlayerCanDiscardDeckAsCost -> Duel.CanPlayerDiscardDeckAsCost
Duel.IsPlayerCanSummon -> Duel.CanPlayerSummon
Duel.IsPlayerCanSpecialSummon -> Duel.CanPlayerSpecialSummon
Duel.IsPlayerCanFlipSummon -> Duel.CanPlayerFlipSummon
Duel.IsPlayerCanSpecialSummonMonster -> Duel.CanPlayerSpecialSummonMonster
Duel.IsPlayerCanSpecialSummonCount -> Duel.CanPlayerSpecialSummonCount
Duel.IsPlayerCanRelease -> Duel.CanPlayerTribute
Duel.IsPlayerCanRemove -> Duel.CanPlayerBanish
Duel.IsPlayerCanSendtoHand -> Duel.CanPlayerAddToHand
Duel.IsPlayerCanSendtoGrave -> Duel.CanPlayerSendToGrave
Duel.IsPlayerCanSendtoDeck -> Duel.CanPlayerSendToDeck
Duel.IsPlayerCanAdditionalSummon -> Duel.CanPlayerSummonAdditionally
Duel.IsCanRemoveCounter -> Duel.CanPlayerRemoveCounter
Duel.SetChainLimitTillChainEnd -> Duel.SetChainLimitUntilChainEnd

Effect.IsHasProperty -> Effect.HasProperty
Effect.IsHasCategory -> Effect.HasCategory
Effect.IsHasType -> Effect.HasType
Effect.IsActivatable -> Effect.CanBeActivated

Unrelated suggestion by @edo9300

GetChainMaterial -> Duel.GetPlayerEffect(tp,EFFECT_CHAIN_MATERIAL)

Suggestions after Dec 10 not included.

@kevinlul kevinlul added the enhancement Internal implementation improvements label Nov 9, 2019
@lrhel

This comment has been minimized.

@edo9300

This comment has been minimized.

@DyXel

This comment has been minimized.

@larry126

This comment has been minimized.

@larry126

This comment has been minimized.

@DyXel

This comment has been minimized.

@ahtelel

This comment has been minimized.

@AlphaKretin

This comment has been minimized.

@ahtelel

This comment has been minimized.

@kevinlul

This comment has been minimized.

@kevinlul kevinlul pinned this issue Jan 25, 2020
@kevinlul kevinlul self-assigned this Feb 1, 2020
@kevinlul
Copy link
Contributor Author

kevinlul commented Feb 11, 2020

List for the second wave

Card.IsAbleToHand -> CanSendToHand
Card.IsAbleToDeck -> CanSendToDeck
Card.IsAbleToExtra -> CanSendToExtra
Card.IsAbleToGrave -> CanSendToGrave
Card.IsAbleToRemove -> CanBeBanished
Card.IsAbleToHandAsCost -> CanSendToHandAsCost
Card.IsAbleToDeckAsCost -> CanSendToDeckAsCost
Card.IsAbleToExtraAsCost -> CanSendToExtraAsCost
Card.IsAbleToDeckOrExtraAsCost -> CanSendToDeckOrExtraAsCost
Card.IsAbleToGraveAsCost -> CanSendToGraveAsCost
Card.IsAbleToRemoveAsCost -> CanBeBanishedAsCost
Card.IsAttackPos -> IsAttackPosition
Card.IsDefensePos -> IsDefensePosition
Card.IsControler -> IsController
Card.GetControler -> GetController
Card.GetPreviousControler -> GetPreviousController
Card.SetSPSummonOnce -> SetSpecialSummonOnce
Card.IsMSetable -> CanSetInMZone
Card.IsSSetable -> CanSetInSZone
Card.IsHasEffect -> Card.HasEffect

Group.TakeatPos -> Group.At
Group.IsContains -> Group.Contains
Group.IsExists -> Group.Exists

Duel.Remove -> Duel.Banish
Duel.SendtoGrave -> Duel.SendToGrave
Duel.SendtoHand -> Duel.SendToHand
Duel.SendtoDeck -> Duel.SendToDeck
Duel.SendtoExtraP -> Duel.SendToExtraFaceup
Duel.Sendto -> Duel.SendTo
Duel.RemoveCards -> Duel.BanishCards
Duel.IsCanAddCounter -> Duel.CanPlayerAddCounter
Duel.Release -> Duel.Tribute
Duel.ConfirmDecktop -> Duel.ConfirmTopDeck
Duel.ConfirmExtratop -> Duel.ConfirmTopExtra
Duel.SortDecktop -> Duel.SortTopDeck
Duel.RDComplete -> Duel.RecoverDamageComplete
Duel.DiscardDeck -> Duel.Mill
Duel.ReleaseRitualMaterial -> Duel.TributeRitualMaterial
Duel.IsAbleToEnterBP -> Duel.CanEnterBattlePhase
Duel.CanPlayerDiscardDeck -> Duel.CanPlayerMill
Duel.CanPlayerDiscardDeckAsCost -> Duel.CanPlayerMillAsCost
Duel.MSet -> Duel.SetInMZone
Duel.SSet -> Duel.SetInSZone
Duel.GetDecktopGroup -> Duel.GetTopDeckGroup
Duel.GetExtraTopGroup -> Duel.GetTopExtraGroup
Duel.IsExistingMatchingCard -> Duel.ExistsMatchingCard
Duel.IsExistingTarget -> Duel.ExistsMatchingTarget
Duel.GetLocationCountFromEx -> Duel.GetLocationCountForExtra
Duel.GetReleaseGroup -> Duel.GetEffectTributeGroup
Duel.GetReleaseGroupCount -> Duel.GetEffectTributeGroupCount
Duel.CheckReleaseGroup -> Duel.CheckEffectTributeGroup
Duel.SelectReleaseGroup -> Duel.SelectEffectTributeGroup
Duel.CheckReleaseGroupEx -> Duel.CheckEffectTributeGroupAdditional
Duel.SelectReleaseGroupEx -> Duel.SelectEffectTributeGroupAdditional
Duel.GetTributeGroup -> Duel.GetSummonTributeGroup
Duel.GetTributeCount -> Duel.GetSummonTributeGroupCount
Duel.IsChainDisablable -> IsChainDisableable

The issue of Card.CanChangeController and Card.CanControllerBeChanged is left for later.
Also unrelated but Duel.VenomSwampCheck will be deleted.

@kevinlul kevinlul changed the title [Discussion] Renaming script functions for better understanding and less clunkiness Renaming script functions for better understanding and less clunkiness Feb 11, 2020
kevinlul added a commit that referenced this issue Feb 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Internal implementation improvements
Projects
None yet
Development

No branches or pull requests

7 participants