Commit 857ccd03 authored by JoyJ's avatar JoyJ

a effect creator form(incompleted)

parent 0fa3f82a
......@@ -54,6 +54,7 @@ private void InitializeComponent()
this.menuitem_about = new System.Windows.Forms.ToolStripMenuItem();
this.menuitem_tools = new System.Windows.Forms.ToolStripMenuItem();
this.menuitem_testlua = new System.Windows.Forms.ToolStripMenuItem();
this.effectCreatorToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.tb_input = new System.Windows.Forms.TextBox();
this.backgroundWorker1 = new System.ComponentModel.BackgroundWorker();
this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
......@@ -184,14 +185,15 @@ private void InitializeComponent()
// menuitem_about
//
this.menuitem_about.Name = "menuitem_about";
this.menuitem_about.Size = new System.Drawing.Size(180, 22);
this.menuitem_about.Size = new System.Drawing.Size(111, 22);
this.menuitem_about.Text = "About";
this.menuitem_about.Click += new System.EventHandler(this.AboutToolStripMenuItemClick);
//
// menuitem_tools
//
this.menuitem_tools.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.menuitem_testlua});
this.menuitem_testlua,
this.effectCreatorToolStripMenuItem});
this.menuitem_tools.Name = "menuitem_tools";
this.menuitem_tools.Size = new System.Drawing.Size(67, 21);
this.menuitem_tools.Text = "Tools(&T)";
......@@ -204,6 +206,15 @@ private void InitializeComponent()
this.menuitem_testlua.Text = "Syntax Check";
this.menuitem_testlua.Click += new System.EventHandler(this.menuitem_testlua_Click);
//
// effectCreatorToolStripMenuItem
//
this.effectCreatorToolStripMenuItem.Name = "effectCreatorToolStripMenuItem";
this.effectCreatorToolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.F3;
this.effectCreatorToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.effectCreatorToolStripMenuItem.Text = "Effect Creator";
this.effectCreatorToolStripMenuItem.Visible = false;
this.effectCreatorToolStripMenuItem.Click += new System.EventHandler(this.effectCreatorToolStripMenuItem_Click);
//
// tb_input
//
this.tb_input.BackColor = System.Drawing.SystemColors.Control;
......@@ -300,6 +311,7 @@ private void InitializeComponent()
this.MainMenuStrip = this.mainMenu;
this.Name = "CodeEditForm";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.TabText = "CodeEditor";
this.Text = "CodeEditor";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.CodeEditFormFormClosing);
this.Load += new System.EventHandler(this.CodeEditFormLoad);
......@@ -333,5 +345,6 @@ private void InitializeComponent()
private System.Windows.Forms.ToolTip toolTip1;
private System.Windows.Forms.ToolStripMenuItem menuitem_tools;
private System.Windows.Forms.ToolStripMenuItem menuitem_testlua;
private System.Windows.Forms.ToolStripMenuItem effectCreatorToolStripMenuItem;
}
}
......@@ -628,5 +628,11 @@ private void menuitem_testlua_Click(object sender, EventArgs e)
MyMsg.Show(LMSG.syntaxCheckPassed);
}
}
private void effectCreatorToolStripMenuItem_Click(object sender, EventArgs e)
{
EffectCreatorForm form = new EffectCreatorForm();
form.Show();
}
}
}
......@@ -12,166 +12,166 @@
namespace DataEditorX.Common
{
/// <summary>
/// 检查更新
/// </summary>
public static class CheckUpdate
{
static CheckUpdate()
{
//连接数
ServicePointManager.DefaultConnectionLimit = 255;
}
/// <summary>
/// 下载URL
/// </summary>
public static string URL = "";
/// <summary>
/// 从HEAD获取版本号
/// </summary>
public const string DEFAULT = "0.0.0.0";
/// <summary>
/// 检查更新
/// </summary>
public static class CheckUpdate
{
static CheckUpdate()
{
//连接数
ServicePointManager.DefaultConnectionLimit = 255;
}
/// <summary>
/// 下载URL
/// </summary>
public static string URL = "";
/// <summary>
/// 从HEAD获取版本号
/// </summary>
public const string DEFAULT = "0.0.0.0";
#region 检查版本
/// <summary>
/// 获取新版本
/// </summary>
/// <param name="VERURL">链接</param>
/// <returns>版本号</returns>
public static string GetNewVersion(string VERURL)
{
string urlver = DEFAULT;
string html = GetHtmlContentByUrl(VERURL);
if (!string.IsNullOrEmpty(html))
{
Regex ver = new Regex(@"\[DataEditorX\]([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)\[DataEditorX\]");
Regex url = new Regex(@"\[URL\]([^\[]+?)\[URL\]");
if (ver.IsMatch(html) && url.IsMatch(html))
{
Match mVer = ver.Match(html);
Match mUrl = url.Match(html);
URL = mUrl.Groups[1].Value;
return $"{mVer.Groups[1].Value}";
}
}
return urlver;
}
/// <summary>
/// 检查版本号,格式0.0.0.0
/// </summary>
/// <param name="ver">0.0.0.0</param>
/// <param name="oldver">0.0.0.0</param>
/// <returns>是否有新版本</returns>
public static bool CheckVersion(string ver, string oldver)
{
bool hasNew = false;
#region 检查版本
/// <summary>
/// 获取新版本
/// </summary>
/// <param name="VERURL">链接</param>
/// <returns>版本号</returns>
public static string GetNewVersion(string VERURL)
{
string urlver = DEFAULT;
string html = GetHtmlContentByUrl(VERURL);
if (!string.IsNullOrEmpty(html))
{
Regex ver = new Regex(@"\[DataEditorX\]([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)\[DataEditorX\]");
Regex url = new Regex(@"\[URL\]([^\[]+?)\[URL\]");
if (ver.IsMatch(html) && url.IsMatch(html))
{
Match mVer = ver.Match(html);
Match mUrl = url.Match(html);
URL = mUrl.Groups[1].Value;
return $"{mVer.Groups[1].Value}";
}
}
return urlver;
}
/// <summary>
/// 检查版本号,格式0.0.0.0
/// </summary>
/// <param name="ver">0.0.0.0</param>
/// <param name="oldver">0.0.0.0</param>
/// <returns>是否有新版本</returns>
public static bool CheckVersion(string ver, string oldver)
{
bool hasNew = false;
#if DEBUG
System.Windows.Forms.MessageBox.Show(oldver + "=>" + ver);
#endif
string[] vers = ver.Split('.');
string[] oldvers = oldver.Split('.');
if (vers.Length == oldvers.Length)
{
//从左到右比较数字
for (int i = 0; i < oldvers.Length; i++)
{
int.TryParse(vers[i], out int j);
int.TryParse(oldvers[i], out int k);
if (j > k)//新的版本号大于旧的
{
hasNew = true;
break;
}
else if (j < k)
{
hasNew = false;
break;
}
}
}
return hasNew;
}
#endregion
string[] vers = ver.Split('.');
string[] oldvers = oldver.Split('.');
if (vers.Length == oldvers.Length)
{
//从左到右比较数字
for (int i = 0; i < oldvers.Length; i++)
{
int.TryParse(vers[i], out int j);
int.TryParse(oldvers[i], out int k);
if (j > k)//新的版本号大于旧的
{
hasNew = true;
break;
}
else if (j < k)
{
hasNew = false;
break;
}
}
}
return hasNew;
}
#endregion
#region 获取网址内容
/// <summary>
/// 获取网址内容
/// </summary>
/// <param name="url">网址</param>
/// <returns>内容</returns>
public static string GetHtmlContentByUrl(string url)
{
string htmlContent = string.Empty;
try
{
HttpWebRequest httpWebRequest =
(HttpWebRequest)WebRequest.Create(url);
httpWebRequest.Timeout = 15000;
using (HttpWebResponse httpWebResponse =
(HttpWebResponse)httpWebRequest.GetResponse())
{
using (Stream stream = httpWebResponse.GetResponseStream())
{
using (StreamReader streamReader =
new StreamReader(stream, Encoding.UTF8))
{
htmlContent = streamReader.ReadToEnd();
streamReader.Close();
}
stream.Close();
}
httpWebResponse.Close();
}
return htmlContent;
}
catch
{
#region 获取网址内容
/// <summary>
/// 获取网址内容
/// </summary>
/// <param name="url">网址</param>
/// <returns>内容</returns>
public static string GetHtmlContentByUrl(string url)
{
string htmlContent = string.Empty;
try
{
HttpWebRequest httpWebRequest =
(HttpWebRequest)WebRequest.Create(url);
httpWebRequest.Timeout = 15000;
using (HttpWebResponse httpWebResponse =
(HttpWebResponse)httpWebRequest.GetResponse())
{
using (Stream stream = httpWebResponse.GetResponseStream())
{
using (StreamReader streamReader =
new StreamReader(stream, Encoding.UTF8))
{
htmlContent = streamReader.ReadToEnd();
streamReader.Close();
}
stream.Close();
}
httpWebResponse.Close();
}
return htmlContent;
}
catch
{
}
return "";
}
#endregion
}
return "";
}
#endregion
#region 下载文件
/// <summary>
/// 下载文件
/// </summary>
/// <param name="filename">保存文件路径</param>
/// <returns>是否下载成功</returns>
public static bool DownLoad(string filename)
{
try
{
if (File.Exists(filename))
{
File.Delete(filename);
}
#region 下载文件
/// <summary>
/// 下载文件
/// </summary>
/// <param name="filename">保存文件路径</param>
/// <returns>是否下载成功</returns>
public static bool DownLoad(string filename)
{
try
{
if (File.Exists(filename))
{
File.Delete(filename);
}
HttpWebRequest Myrq = (HttpWebRequest)WebRequest.Create(URL);
HttpWebResponse myrp = (HttpWebResponse)Myrq.GetResponse();
long totalBytes = myrp.ContentLength;
HttpWebRequest Myrq = (HttpWebRequest)WebRequest.Create(URL);
HttpWebResponse myrp = (HttpWebResponse)Myrq.GetResponse();
long totalBytes = myrp.ContentLength;
Stream st = myrp.GetResponseStream();
Stream so = new FileStream(filename + ".tmp", FileMode.Create);
long totalDownloadedByte = 0;
byte[] by = new byte[1024 * 512];
int osize = st.Read(by, 0, by.Length);
while (osize > 0)
{
totalDownloadedByte = osize + totalDownloadedByte;
System.Windows.Forms.Application.DoEvents();
so.Write(by, 0, osize);
osize = st.Read(by, 0, by.Length);
}
so.Close();
st.Close();
File.Move(filename + ".tmp", filename);
}
catch (System.Exception)
{
return false;
}
return true;
}
#endregion
}
Stream st = myrp.GetResponseStream();
Stream so = new FileStream(filename + ".tmp", FileMode.Create);
long totalDownloadedByte = 0;
byte[] by = new byte[1024 * 512];
int osize = st.Read(by, 0, by.Length);
while (osize > 0)
{
totalDownloadedByte = osize + totalDownloadedByte;
System.Windows.Forms.Application.DoEvents();
so.Write(by, 0, osize);
osize = st.Read(by, 0, by.Length);
}
so.Close();
st.Close();
File.Move(filename + ".tmp", filename);
}
catch (System.Exception)
{
return false;
}
return true;
}
#endregion
}
}
......@@ -10,109 +10,109 @@
namespace FastColoredTextBoxNS
{
/// <summary>
/// ygocore的lua高亮,夜间
/// </summary>
public class MySyntaxHighlighter : SyntaxHighlighter
{
public string cCode = "";
readonly TextStyle mNumberStyle = new TextStyle(Brushes.Orange, null, FontStyle.Regular);
readonly TextStyle mStrStyle = new TextStyle(Brushes.Gold, null, FontStyle.Regular);
readonly TextStyle conStyle = new TextStyle(Brushes.YellowGreen, null, FontStyle.Regular);
readonly TextStyle mKeywordStyle = new TextStyle(Brushes.DeepSkyBlue, null, FontStyle.Regular);
readonly TextStyle mGrayStyle = new TextStyle(Brushes.Gray, null, FontStyle.Regular);
readonly TextStyle mFunStyle = new TextStyle(Brushes.MediumAquamarine, null, FontStyle.Regular);
readonly TextStyle mErrorStyle = new TextStyle(Brushes.Red, null, FontStyle.Bold);
readonly TextStyle mErrorStyle2 = new TextStyle(Brushes.Red, null, FontStyle.Bold);
/// <summary>
/// ygocore的lua高亮,夜间
/// </summary>
public class MySyntaxHighlighter : SyntaxHighlighter
{
public string cCode = "";
readonly TextStyle mNumberStyle = new TextStyle(Brushes.Orange, null, FontStyle.Regular);
readonly TextStyle mStrStyle = new TextStyle(Brushes.Gold, null, FontStyle.Regular);
readonly TextStyle conStyle = new TextStyle(Brushes.YellowGreen, null, FontStyle.Regular);
readonly TextStyle mKeywordStyle = new TextStyle(Brushes.DeepSkyBlue, null, FontStyle.Regular);
readonly TextStyle mGrayStyle = new TextStyle(Brushes.Gray, null, FontStyle.Regular);
readonly TextStyle mFunStyle = new TextStyle(Brushes.MediumAquamarine, null, FontStyle.Regular);
readonly TextStyle mErrorStyle = new TextStyle(Brushes.Red, null, FontStyle.Bold);
readonly TextStyle mErrorStyle2 = new TextStyle(Brushes.Red, null, FontStyle.Bold);
public MySyntaxHighlighter(FastColoredTextBox currentTb) : base(currentTb)
{
}
public MySyntaxHighlighter(FastColoredTextBox currentTb) : base(currentTb)
{
}
/// <summary>
/// Highlights Lua code
/// </summary>
/// <param name="range"></param>
public override void LuaSyntaxHighlight(Range range)
{
range.tb.CommentPrefix = "--";
range.tb.LeftBracket = '(';
range.tb.RightBracket = ')';
range.tb.LeftBracket2 = '{';
range.tb.RightBracket2 = '}';
range.tb.BracketsHighlightStrategy = BracketsHighlightStrategy.Strategy1;
/// <summary>
/// Highlights Lua code
/// </summary>
/// <param name="range"></param>
public override void LuaSyntaxHighlight(Range range)
{
range.tb.CommentPrefix = "--";
range.tb.LeftBracket = '(';
range.tb.RightBracket = ')';
range.tb.LeftBracket2 = '{';
range.tb.RightBracket2 = '}';
range.tb.BracketsHighlightStrategy = BracketsHighlightStrategy.Strategy1;
range.tb.AutoIndentCharsPatterns
= @"^\s*[\w\.]+(\s\w+)?\s*(?<range>=)\s*(?<range>.+)";
range.tb.AutoIndentCharsPatterns
= @"^\s*[\w\.]+(\s\w+)?\s*(?<range>=)\s*(?<range>.+)";
//clear style of changed range
range.ClearStyle(this.mStrStyle, this.mGrayStyle, this.conStyle, this.mNumberStyle, this.mKeywordStyle, this.mFunStyle, this.mErrorStyle, this.mErrorStyle2);
//
if (this.LuaStringRegex == null)
{
this.InitLuaRegex();
}
//comment highlighting
range.SetStyle(this.mGrayStyle, this.LuaCommentRegex1);
range.SetStyle(this.mGrayStyle, this.LuaCommentRegex2);
range.SetStyle(this.mGrayStyle, this.LuaCommentRegex3);
//number highlighting
range.SetStyle(this.mNumberStyle, this.LuaNumberRegex);
range.SetStyle(this.mErrorStyle2, @"\bSetCountLimit\([0-9]+\,c[0-9]+\b");
range.SetStyle(this.mNumberStyle, $@"\b{cCode}\b");
//clear style of changed range
range.ClearStyle(this.mStrStyle, this.mGrayStyle, this.conStyle, this.mNumberStyle, this.mKeywordStyle, this.mFunStyle, this.mErrorStyle, this.mErrorStyle2);
//
if (this.LuaStringRegex == null)
{
this.InitLuaRegex();
}
//comment highlighting
range.SetStyle(this.mGrayStyle, this.LuaCommentRegex1);
range.SetStyle(this.mGrayStyle, this.LuaCommentRegex2);
range.SetStyle(this.mGrayStyle, this.LuaCommentRegex3);
//number highlighting
range.SetStyle(this.mNumberStyle, this.LuaNumberRegex);
range.SetStyle(this.mErrorStyle2, @"\bSetCountLimit\([0-9]+\,c[0-9]+\b");
range.SetStyle(this.mNumberStyle, $@"\b{cCode}\b");
//keyword highlighting
range.SetStyle(this.mKeywordStyle, this.LuaKeywordRegex);
//functions highlighting
range.SetStyle(this.mFunStyle, this.LuaFunctionsRegex);
string cardFunctions = @"IsRitualType|SetEntityCode|SetCardData|GetLinkMarker|GetOriginalLinkMarker|IsXyzSummonableByRose|GetRemovedOverlayCount|IsAbleToDecreaseAttackAsCost|IsAbleToDecreaseDefenseAsCost|GetCode|GetOriginalCode|GetOriginalCodeRule|GetFusionCode|GetLinkCode|IsFusionCode|IsLinkCode|IsSetCard|IsOriginalSetCard|IsPreviousSetCard|IsFusionSetCard|IsLinkSetCard|GetType|GetOriginalType|GetFusionType|GetSynchroType|GetXyzType|GetLinkType|GetLevel|GetRank|GetLink|GetSynchroLevel|GetRitualLevel|GetOriginalLevel|GetOriginalRank|IsXyzLevel|GetLeftScale|GetOriginalLeftScale|GetRightScale|GetOriginalRightScale|IsLinkMarker|GetLinkedGroup|GetLinkedGroupCount|GetLinkedZone|GetMutualLinkedGroup|GetMutualLinkedGroupCount|GetMutualLinkedZone|IsLinkState|IsExtraLinkState|GetColumnGroup|GetColumnGroupCount|GetColumnZone|IsAllColumn|GetAttribute|GetOriginalAttribute|GetFusionAttribute|GetLinkAttribute|GetRace|GetOriginalRace|GetLinkRace|GetAttack|GetBaseAttack|GetTextAttack|GetDefense|GetBaseDefense|GetTextDefense|GetPreviousCodeOnField|GetPreviousTypeOnField|GetPreviousLevelOnField|GetPreviousRankOnField|GetPreviousAttributeOnField|GetPreviousRaceOnField|GetPreviousAttackOnField|GetPreviousDefenseOnField|GetOwner|GetControler|GetPreviousControler|GetReason|GetReasonCard|GetReasonPlayer|GetReasonEffect|GetPosition|GetPreviousPosition|GetBattlePosition|GetLocation|GetPreviousLocation|GetSequence|GetPreviousSequence|GetSummonType|GetSummonLocation|GetSummonPlayer|GetDestination|GetLeaveFieldDest|GetTurnID|GetFieldID|GetRealFieldID|IsOriginalCodeRule|IsCode|IsType|IsFusionType|IsSynchroType|IsXyzType|IsLinkType|IsLevel|IsRank|IsLink|IsAttack|IsDefense|IsRace|IsLinkRace|IsAttribute|IsFusionAttribute|IsLinkAttribute|IsReason|IsSummonType|IsStatus|IsNotTuner|SetStatus|IsDualState|EnableDualState|SetTurnCounter|GetTurnCounter|SetMaterial|GetMaterial|GetMaterialCount|GetEquipGroup|GetEquipCount|GetEquipTarget|GetPreviousEquipTarget|CheckEquipTarget|GetUnionCount|GetOverlayGroup|GetOverlayCount|GetOverlayTarget|CheckRemoveOverlayCard|RemoveOverlayCard|GetAttackedGroup|GetAttackedGroupCount|GetAttackedCount|GetBattledGroup|GetBattledGroupCount|GetAttackAnnouncedCount|IsDirectAttacked|SetCardTarget|GetCardTarget|GetFirstCardTarget|GetCardTargetCount|IsHasCardTarget|CancelCardTarget|GetOwnerTarget|GetOwnerTargetCount|GetActivateEffect|CheckActivateEffect|GetTunerLimit|GetHandSynchro|RegisterEffect|IsHasEffect|ResetEffect|GetEffectCount|RegisterFlagEffect|GetFlagEffect|ResetFlagEffect|SetFlagEffectLabel|GetFlagEffectLabel|CreateRelation|ReleaseRelation|CreateEffectRelation|ReleaseEffectRelation|ClearEffectRelation|IsRelateToEffect|IsRelateToChain|IsRelateToCard|IsRelateToBattle|CopyEffect|ReplaceEffect|EnableReviveLimit|CompleteProcedure|IsDisabled|IsDestructable|IsSummonableCard|IsFusionSummonableCard|IsSpecialSummonable|IsSynchroSummonable|IsXyzSummonable|IsLinkSummonable|IsSummonable|IsMSetable|IsSSetable|IsCanBeSpecialSummoned|IsAbleToHand|IsAbleToDeck|IsAbleToExtra|IsAbleToGrave|IsAbleToRemove|IsAbleToHandAsCost|IsAbleToDeckAsCost|IsAbleToExtraAsCost|IsAbleToDeckOrExtraAsCost|IsAbleToGraveAsCost|IsAbleToRemoveAsCost|IsReleasable|IsReleasableByEffect|IsDiscardable|IsAttackable|IsChainAttackable|IsFaceup|IsAttackPos|IsFacedown|IsDefensePos|IsPosition|IsPreviousPosition|IsControler|IsOnField|IsLocation|IsPreviousLocation|IsLevelBelow|IsLevelAbove|IsRankBelow|IsRankAbove|IsLinkBelow|IsLinkAbove|IsAttackBelow|IsAttackAbove|IsDefenseBelow|IsDefenseAbove|IsPublic|IsForbidden|IsAbleToChangeControler|IsControlerCanBeChanged|AddCounter|RemoveCounter|GetCounter|EnableCounterPermit|SetCounterLimit|IsCanChangePosition|IsCanTurnSet|IsCanAddCounter|IsCanRemoveCounter|IsCanOverlay|IsCanBeFusionMaterial|IsCanBeSynchroMaterial|IsCanBeRitualMaterial|IsCanBeXyzMaterial|IsCanBeLinkMaterial|CheckFusionMaterial|CheckFusionSubstitute|IsImmuneToEffect|IsCanBeEffectTarget|IsCanBeBattleTarget|AddMonsterAttribute|CancelToGrave|GetTributeRequirement|GetBattleTarget|GetAttackableTarget|SetHint|ReverseInDeck|SetUniqueOnField|CheckUniqueOnField|ResetNegateEffect|AssumeProperty|SetSPSummonOnce";
range.SetStyle(this.mFunStyle, $@"\bCard\.({cardFunctions})\b");
range.SetStyle(this.mFunStyle, $@"\b([a-z]{{0,3}}c|a|d):({cardFunctions})\b");
string duelFunctions = @"SelectField|GetMasterRule|ReadCard|Exile|DisableActionCheck|SetMetatable|MoveTurnCount|GetCardsInZone|XyzSummonByRose|LoadScript|AnnounceCardFilter|EnableGlobalFlag|GetLP|SetLP|GetTurnPlayer|GetTurnCount|GetDrawCount|RegisterEffect|RegisterFlagEffect|GetFlagEffect|ResetFlagEffect|SetFlagEffectLabel|GetFlagEffectLabel|Destroy|Remove|SendtoGrave|SendtoHand|SendtoDeck|SendtoExtraP|GetOperatedGroup|Summon|SpecialSummonRule|SynchroSummon|XyzSummon|LinkSummon|MSet|SSet|CreateToken|SpecialSummon|SpecialSummonStep|SpecialSummonComplete|IsCanAddCounter|RemoveCounter|IsCanRemoveCounter|GetCounter|ChangePosition|Release|MoveToField|ReturnToField|MoveSequence|SwapSequence|Activate|SetChainLimit|SetChainLimitTillChainEnd|GetChainMaterial|ConfirmDecktop|ConfirmExtratop|ConfirmCards|SortDecktop|CheckEvent|RaiseEvent|RaiseSingleEvent|CheckTiming|GetEnvironment|IsEnvironment|Win|Draw|Damage|Recover|RDComplete|Equip|EquipComplete|GetControl|SwapControl|CheckLPCost|PayLPCost|DiscardDeck|DiscardHand|DisableShuffleCheck|ShuffleDeck|ShuffleExtra|ShuffleHand|ShuffleSetCard|ChangeAttacker|ChangeAttackTarget|CalculateDamage|GetBattleDamage|ChangeBattleDamage|ChangeTargetCard|ChangeTargetPlayer|ChangeTargetParam|BreakEffect|ChangeChainOperation|NegateActivation|NegateEffect|NegateRelatedChain|NegateSummon|IncreaseSummonedCount|CheckSummonedCount|GetLocationCount|GetMZoneCount|GetLocationCountFromEx|GetUsableMZoneCount|GetLinkedGroup|GetLinkedGroupCount|GetLinkedZone|GetFieldCard|CheckLocation|GetCurrentChain|GetChainInfo|GetChainEvent|GetFirstTarget|GetCurrentPhase|SkipPhase|IsDamageCalculated|GetAttacker|GetAttackTarget|GetBattleMonster|NegateAttack|ChainAttack|Readjust|AdjustInstantly|GetFieldGroup|GetFieldGroupCount|GetDecktopGroup|GetExtraTopGroup|GetMatchingGroup|GetMatchingGroupCount|GetFirstMatchingCard|IsExistingMatchingCard|SelectMatchingCard|GetReleaseGroup|GetReleaseGroupCount|CheckReleaseGroup|SelectReleaseGroup|CheckReleaseGroupEx|SelectReleaseGroupEx|GetTributeGroup|GetTributeCount|CheckTribute|SelectTribute|GetTargetCount|IsExistingTarget|SelectTarget|SelectFusionMaterial|SetFusionMaterial|SetSynchroMaterial|SelectSynchroMaterial|CheckSynchroMaterial|SelectTunerMaterial|CheckTunerMaterial|GetRitualMaterial|ReleaseRitualMaterial|GetFusionMaterial|IsSummonCancelable|SetSelectedCard|GrabSelectedCard|SetTargetCard|ClearTargetCard|SetTargetPlayer|SetTargetParam|SetOperationInfo|GetOperationInfo|GetOperationCount|ClearOperationInfo|CheckXyzMaterial|SelectXyzMaterial|Overlay|GetOverlayGroup|GetOverlayCount|CheckRemoveOverlayCard|RemoveOverlayCard|Hint|HintSelection|SelectEffectYesNo|SelectYesNo|SelectOption|SelectSequence|SelectPosition|SelectDisableField|AnnounceRace|AnnounceAttribute|AnnounceLevel|AnnounceCard|AnnounceType|AnnounceNumber|AnnounceCoin|TossCoin|TossDice|RockPaperScissors|GetCoinResult|GetDiceResult|SetCoinResult|SetDiceResult|IsPlayerAffectedByEffect|IsPlayerCanDraw|IsPlayerCanDiscardDeck|IsPlayerCanDiscardDeckAsCost|IsPlayerCanSummon|IsPlayerCanMSet|IsPlayerCanSSet|IsPlayerCanSpecialSummon|IsPlayerCanFlipSummon|IsPlayerCanSpecialSummonMonster|IsPlayerCanSpecialSummonCount|IsPlayerCanRelease|IsPlayerCanRemove|IsPlayerCanSendtoHand|IsPlayerCanSendtoGrave|IsPlayerCanSendtoDeck|IsPlayerCanAdditionalSummon|IsChainNegatable|IsChainDisablable|CheckChainTarget|CheckChainUniqueness|GetActivityCount|CheckPhaseActivity|AddCustomActivityCounter|GetCustomActivityCount|GetBattledCount|IsAbleToEnterBP|SwapDeckAndGrave|MajesticCopy";
range.SetStyle(this.mFunStyle, $@"\bDuel\.({duelFunctions})\b");
string groupFunctions = @"CreateGroup|FromCards|KeepAlive|DeleteGroup|Clone|Clear|AddCard|Merge|RemoveCard|Sub|GetNext|GetFirst|GetCount|__len|ForEach|Filter|FilterCount|FilterSelect|Select|SelectUnselect|RandomSelect|IsExists|CheckWithSumEqual|SelectWithSumEqual|CheckWithSumGreater|SelectWithSumGreater|GetMinGroup|GetMaxGroup|GetSum|GetClassCount|Remove|Equal|IsContains|SearchCard|GetBinClassCount|__add|__bor|__sub|__band|__bxor";
range.SetStyle(this.mFunStyle, $@"\bGroup\.({groupFunctions})\b");
range.SetStyle(this.mFunStyle, $@"\b[a-z]{{0,3}}g[0-9]{{0,2}}:({groupFunctions})\b");
string effectFunctions = @"SetOwner|GetRange|GetCountLimit|CreateEffect|GlobalEffect|Clone|Reset|GetFieldID|SetDescription|SetCode|SetRange|SetTargetRange|SetAbsoluteRange|SetCountLimit|SetReset|SetType|SetProperty|SetLabel|SetLabelObject|SetCategory|SetHintTiming|SetCondition|SetTarget|SetCost|SetValue|SetOperation|SetOwnerPlayer|GetDescription|GetCode|GetType|GetProperty|GetLabel|GetLabelObject|GetCategory|GetOwner|GetHandler|GetCondition|GetTarget|GetCost|GetValue|GetOperation|GetActiveType|IsActiveType|GetOwnerPlayer|GetHandlerPlayer|IsHasProperty|IsHasCategory|IsHasType|IsActivatable|IsActivated|GetActivateLocation|GetActivateSequence|CheckCountLimit|UseCountLimit";
range.SetStyle(this.mFunStyle, $@"\bEffect\.({effectFunctions})\b");
string rrr = $@"\b[a-z]{{0,1}}e[0-9v]{{0,2}}:({effectFunctions})\b";
range.SetStyle(this.mFunStyle, rrr);
string debugFunctions = @"Message|AddCard|SetPlayerInfo|PreSummon|PreEquip|PreSetTarget|PreAddCounter|ReloadFieldBegin|ReloadFieldEnd|SetAIName|ShowHint";
range.SetStyle(this.mFunStyle, $@"\bDebug\.({debugFunctions})\b");
string auxFunctions = @"bit.band|bit.bor|bit.bxor|bit.lshift|bit.rshift|bit.bnot|bit.extract|bit.replace|Auxiliary.Stringid|Auxiliary.Next|Auxiliary.NULL|Auxiliary.TRUE|Auxiliary.FALSE|Auxiliary.AND|Auxiliary.OR|Auxiliary.NOT|Auxiliary.BeginPuzzle|Auxiliary.PuzzleOp|Auxiliary.IsDualState|Auxiliary.IsNotDualState|Auxiliary.DualNormalCondition|Auxiliary.EnableDualAttribute|Auxiliary.EnableSpiritReturn|Auxiliary.SpiritReturnReg|Auxiliary.SpiritReturnCondition|Auxiliary.SpiritReturnTarget|Auxiliary.SpiritReturnOperation|Auxiliary.IsUnionState|Auxiliary.SetUnionState|Auxiliary.CheckUnionEquip|Auxiliary.TargetEqualFunction|Auxiliary.TargetBoolFunction|Auxiliary.FilterEqualFunction|Auxiliary.FilterBoolFunction|Auxiliary.Tuner|Auxiliary.NonTuner|Auxiliary.GetValueType|Auxiliary.GetMustMaterialGroup|Auxiliary.MustMaterialCheck|Auxiliary.MustMaterialCounterFilter|Auxiliary.AddSynchroProcedure|Auxiliary.SynCondition|Auxiliary.SynTarget|Auxiliary.SynOperation|Auxiliary.AddSynchroMixProcedure|Auxiliary.SynMaterialFilter|Auxiliary.SynLimitFilter|Auxiliary.GetSynchroLevelFlowerCardian|Auxiliary.GetSynMaterials|Auxiliary.SynMixCondition|Auxiliary.SynMixTarget|Auxiliary.SynMixOperation|Auxiliary.SynMixCheck|Auxiliary.SynMixCheckRecursive|Auxiliary.SynMixCheckGoal|Auxiliary.TuneMagicianFilter|Auxiliary.TuneMagicianCheckX|Auxiliary.TuneMagicianCheckAdditionalX|Auxiliary.XyzAlterFilter|Auxiliary.AddXyzProcedure|Auxiliary.XyzCondition|Auxiliary.XyzTarget|Auxiliary.XyzOperation|Auxiliary.AddXyzProcedureLevelFree|Auxiliary.XyzLevelFreeFilter|Auxiliary.XyzLevelFreeGoal|Auxiliary.XyzLevelFreeCondition|Auxiliary.XyzLevelFreeTarget|Auxiliary.XyzLevelFreeOperation|Auxiliary.AddFusionProcMix|Auxiliary.FConditionMix|Auxiliary.FOperationMix|Auxiliary.FConditionFilterMix|Auxiliary.FCheckMix|Auxiliary.FCheckMixGoal|Auxiliary.AddFusionProcMixRep|Auxiliary.FConditionMixRep|Auxiliary.FOperationMixRep|Auxiliary.FCheckMixRep|Auxiliary.FCheckMixRepFilter|Auxiliary.FCheckMixRepGoal|Auxiliary.FCheckMixRepTemplate|Auxiliary.FCheckMixRepSelectedCond|Auxiliary.FCheckMixRepSelected|Auxiliary.FCheckSelectMixRep|Auxiliary.FCheckSelectMixRepAll|Auxiliary.FCheckSelectMixRepM|Auxiliary.FSelectMixRep|Auxiliary.AddFusionProcCodeRep|Auxiliary.AddFusionProcCodeFun|Auxiliary.AddFusionProcFunRep|Auxiliary.AddFusionProcFunFun|Auxiliary.AddFusionProcFunFunRep|Auxiliary.AddFusionProcCodeFunRep|Auxiliary.AddFusionProcShaddoll|Auxiliary.FShaddollFilter|Auxiliary.FShaddollExFilter|Auxiliary.FShaddollCondition|Auxiliary.FShaddollOperation|Auxiliary.AddContactFusionProcedure|Auxiliary.ContactFusionMaterialFilter|Auxiliary.ContactFusionCondition|Auxiliary.ContactFusionOperation|Auxiliary.AddRitualProcUltimate|Auxiliary.RitualCheckGreater|Auxiliary.RitualCheckEqual|Auxiliary.RitualCheck|Auxiliary.RitualCheckAdditionalLevel|Auxiliary.RitualCheckAdditional|Auxiliary.RitualUltimateFilter|Auxiliary.RitualExtraFilter|Auxiliary.RitualUltimateTarget|Auxiliary.RitualUltimateOperation|Auxiliary.AddRitualProcGreater|Auxiliary.AddRitualProcGreaterCode|Auxiliary.AddRitualProcEqual|Auxiliary.AddRitualProcEqualCode|Auxiliary.EnablePendulumAttribute|Auxiliary.PendulumReset|Auxiliary.PConditionExtraFilterSpecific|Auxiliary.PConditionExtraFilter|Auxiliary.PConditionFilter|Auxiliary.PendCondition|Auxiliary.PendOperationCheck|Auxiliary.PendOperation|Auxiliary.EnableReviveLimitPendulumSummonable|Auxiliary.PendulumSummonableBool|Auxiliary.PSSCompleteProcedure|Auxiliary.AddLinkProcedure|Auxiliary.LConditionFilter|Auxiliary.LExtraFilter|Auxiliary.GetLinkCount|Auxiliary.GetLinkMaterials|Auxiliary.LCheckOtherMaterial|Auxiliary.LUncompatibilityFilter|Auxiliary.LCheckGoal|Auxiliary.LExtraMaterialCount|Auxiliary.LinkCondition|Auxiliary.LinkTarget|Auxiliary.LinkOperation|Auxiliary.EnableExtraDeckSummonCountLimit|Auxiliary.ExtraDeckSummonCountLimitReset|Auxiliary.IsMaterialListCode|Auxiliary.IsMaterialListSetCard|Auxiliary.IsMaterialListType|Auxiliary.AddCodeList|Auxiliary.IsCodeListed|Auxiliary.IsCounterAdded|Auxiliary.IsInGroup|Auxiliary.GetColumn|Auxiliary.MZoneSequence|Auxiliary.SZoneSequence|Auxiliary.ChangeBattleDamage|Auxiliary.bdcon|Auxiliary.bdocon|Auxiliary.bdgcon|Auxiliary.bdogcon|Auxiliary.dogcon|Auxiliary.dogfcon|Auxiliary.exccon|Auxiliary.bpcon|Auxiliary.dscon|Auxiliary.chainreg|Auxiliary.indsval|Auxiliary.indoval|Auxiliary.tgsval|Auxiliary.tgoval|Auxiliary.nzatk|Auxiliary.nzdef|Auxiliary.sumreg|Auxiliary.fuslimit|Auxiliary.ritlimit|Auxiliary.synlimit|Auxiliary.xyzlimit|Auxiliary.penlimit|Auxiliary.linklimit|Auxiliary.qlifilter|Auxiliary.gbspcon|Auxiliary.evospcon|Auxiliary.NecroValleyFilter|Auxiliary.bfgcost|Auxiliary.dncheck|Auxiliary.dlvcheck|Auxiliary.drkcheck|Auxiliary.dlkcheck|Auxiliary.dabcheck|Auxiliary.drccheck|Auxiliary.gfcheck|Auxiliary.gffcheck|Auxiliary.mzctcheck|Auxiliary.mzctcheckrel|Auxiliary.ExceptThisCard|Auxiliary.GetMultiLinkedZone|Auxiliary.CheckGroupRecursive|Auxiliary.CheckGroupRecursiveCapture|Group.CheckSubGroup|Group.SelectSubGroup|Auxiliary.CreateChecks|Auxiliary.CheckGroupRecursiveEach|Group.CheckSubGroupEach|Group.SelectSubGroupEach|Auxiliary.nbcon|Auxiliary.tdcfop|bit.band|bit.bor|bit.bxor|bit.lshift|bit.rshift|bit.bnot|bit.extract|bit.replace|aux.Stringid|aux.Next|aux.NULL|aux.TRUE|aux.FALSE|aux.AND|aux.OR|aux.NOT|aux.BeginPuzzle|aux.PuzzleOp|aux.IsDualState|aux.IsNotDualState|aux.DualNormalCondition|aux.EnableDualAttribute|aux.EnableSpiritReturn|aux.SpiritReturnReg|aux.SpiritReturnCondition|aux.SpiritReturnTarget|aux.SpiritReturnOperation|aux.IsUnionState|aux.SetUnionState|aux.CheckUnionEquip|aux.TargetEqualFunction|aux.TargetBoolFunction|aux.FilterEqualFunction|aux.FilterBoolFunction|aux.Tuner|aux.NonTuner|aux.GetValueType|aux.GetMustMaterialGroup|aux.MustMaterialCheck|aux.MustMaterialCounterFilter|aux.AddSynchroProcedure|aux.SynCondition|aux.SynTarget|aux.SynOperation|aux.AddSynchroMixProcedure|aux.SynMaterialFilter|aux.SynLimitFilter|aux.GetSynchroLevelFlowerCardian|aux.GetSynMaterials|aux.SynMixCondition|aux.SynMixTarget|aux.SynMixOperation|aux.SynMixCheck|aux.SynMixCheckRecursive|aux.SynMixCheckGoal|aux.TuneMagicianFilter|aux.TuneMagicianCheckX|aux.TuneMagicianCheckAdditionalX|aux.XyzAlterFilter|aux.AddXyzProcedure|aux.XyzCondition|aux.XyzTarget|aux.XyzOperation|aux.AddXyzProcedureLevelFree|aux.XyzLevelFreeFilter|aux.XyzLevelFreeGoal|aux.XyzLevelFreeCondition|aux.XyzLevelFreeTarget|aux.XyzLevelFreeOperation|aux.AddFusionProcMix|aux.FConditionMix|aux.FOperationMix|aux.FConditionFilterMix|aux.FCheckMix|aux.FCheckMixGoal|aux.AddFusionProcMixRep|aux.FConditionMixRep|aux.FOperationMixRep|aux.FCheckMixRep|aux.FCheckMixRepFilter|aux.FCheckMixRepGoal|aux.FCheckMixRepTemplate|aux.FCheckMixRepSelectedCond|aux.FCheckMixRepSelected|aux.FCheckSelectMixRep|aux.FCheckSelectMixRepAll|aux.FCheckSelectMixRepM|aux.FSelectMixRep|aux.AddFusionProcCodeRep|aux.AddFusionProcCodeFun|aux.AddFusionProcFunRep|aux.AddFusionProcFunFun|aux.AddFusionProcFunFunRep|aux.AddFusionProcCodeFunRep|aux.AddFusionProcShaddoll|aux.FShaddollFilter|aux.FShaddollExFilter|aux.FShaddollCondition|aux.FShaddollOperation|aux.AddContactFusionProcedure|aux.ContactFusionMaterialFilter|aux.ContactFusionCondition|aux.ContactFusionOperation|aux.AddRitualProcUltimate|aux.RitualCheckGreater|aux.RitualCheckEqual|aux.RitualCheck|aux.RitualCheckAdditionalLevel|aux.RitualCheckAdditional|aux.RitualUltimateFilter|aux.RitualExtraFilter|aux.RitualUltimateTarget|aux.RitualUltimateOperation|aux.AddRitualProcGreater|aux.AddRitualProcGreaterCode|aux.AddRitualProcEqual|aux.AddRitualProcEqualCode|aux.EnablePendulumAttribute|aux.PendulumReset|aux.PConditionExtraFilterSpecific|aux.PConditionExtraFilter|aux.PConditionFilter|aux.PendCondition|aux.PendOperationCheck|aux.PendOperation|aux.EnableReviveLimitPendulumSummonable|aux.PendulumSummonableBool|aux.PSSCompleteProcedure|aux.AddLinkProcedure|aux.LConditionFilter|aux.LExtraFilter|aux.GetLinkCount|aux.GetLinkMaterials|aux.LCheckOtherMaterial|aux.LUncompatibilityFilter|aux.LCheckGoal|aux.LExtraMaterialCount|aux.LinkCondition|aux.LinkTarget|aux.LinkOperation|aux.EnableExtraDeckSummonCountLimit|aux.ExtraDeckSummonCountLimitReset|aux.IsMaterialListCode|aux.IsMaterialListSetCard|aux.IsMaterialListType|aux.AddCodeList|aux.IsCodeListed|aux.IsCounterAdded|aux.IsInGroup|aux.GetColumn|aux.MZoneSequence|aux.SZoneSequence|aux.ChangeBattleDamage|aux.bdcon|aux.bdocon|aux.bdgcon|aux.bdogcon|aux.dogcon|aux.dogfcon|aux.exccon|aux.bpcon|aux.dscon|aux.chainreg|aux.indsval|aux.indoval|aux.tgsval|aux.tgoval|aux.nzatk|aux.nzdef|aux.sumreg|aux.fuslimit|aux.ritlimit|aux.synlimit|aux.xyzlimit|aux.penlimit|aux.linklimit|aux.qlifilter|aux.gbspcon|aux.evospcon|aux.NecroValleyFilter|aux.bfgcost|aux.dncheck|aux.dlvcheck|aux.drkcheck|aux.dlkcheck|aux.dabcheck|aux.drccheck|aux.gfcheck|aux.gffcheck|aux.mzctcheck|aux.mzctcheckrel|aux.ExceptThisCard|aux.GetMultiLinkedZone|aux.CheckGroupRecursive|aux.CheckGroupRecursiveCapture|Group.CheckSubGroup|Group.SelectSubGroup|aux.CreateChecks|aux.CheckGroupRecursiveEach|Group.CheckSubGroupEach|Group.SelectSubGroupEach|aux.nbcon|aux.tdcfop";
range.SetStyle(this.mFunStyle, $@"\b({auxFunctions})\b");
range.SetStyle(this.conStyle, @"[\s|\(|+|,]{0,1}(?<range>[A-Z_]+?)[\)|+|\s|,|;]");
//range.SetStyle(mFunStyle, @"[:|\.|\s](?<range>[a-zA-Z0-9_]*?)[\(|\)|\s]");
//string highlighting
range.SetStyle(this.mStrStyle, this.LuaStringRegex);
//errors highlighting
List<string> errorRegexes = new List<string>();
this.InitErrorRegexes(ref errorRegexes);
foreach (string regex in errorRegexes)
{
range.SetStyle(this.mErrorStyle, regex);
}
//clear folding markers
range.ClearFoldingMarkers();
//set folding markers
range.SetFoldingMarkers("{", "}"); //allow to collapse brackets block
range.SetFoldingMarkers(@"--\[\[", @"\]\]"); //allow to collapse comment block
}
//keyword highlighting
range.SetStyle(this.mKeywordStyle, this.LuaKeywordRegex);
//functions highlighting
range.SetStyle(this.mFunStyle, this.LuaFunctionsRegex);
string cardFunctions = @"IsRitualType|SetEntityCode|SetCardData|GetLinkMarker|GetOriginalLinkMarker|IsXyzSummonableByRose|GetRemovedOverlayCount|IsAbleToDecreaseAttackAsCost|IsAbleToDecreaseDefenseAsCost|GetCode|GetOriginalCode|GetOriginalCodeRule|GetFusionCode|GetLinkCode|IsFusionCode|IsLinkCode|IsSetCard|IsOriginalSetCard|IsPreviousSetCard|IsFusionSetCard|IsLinkSetCard|GetType|GetOriginalType|GetFusionType|GetSynchroType|GetXyzType|GetLinkType|GetLevel|GetRank|GetLink|GetSynchroLevel|GetRitualLevel|GetOriginalLevel|GetOriginalRank|IsXyzLevel|GetLeftScale|GetOriginalLeftScale|GetRightScale|GetOriginalRightScale|IsLinkMarker|GetLinkedGroup|GetLinkedGroupCount|GetLinkedZone|GetMutualLinkedGroup|GetMutualLinkedGroupCount|GetMutualLinkedZone|IsLinkState|IsExtraLinkState|GetColumnGroup|GetColumnGroupCount|GetColumnZone|IsAllColumn|GetAttribute|GetOriginalAttribute|GetFusionAttribute|GetLinkAttribute|GetRace|GetOriginalRace|GetLinkRace|GetAttack|GetBaseAttack|GetTextAttack|GetDefense|GetBaseDefense|GetTextDefense|GetPreviousCodeOnField|GetPreviousTypeOnField|GetPreviousLevelOnField|GetPreviousRankOnField|GetPreviousAttributeOnField|GetPreviousRaceOnField|GetPreviousAttackOnField|GetPreviousDefenseOnField|GetOwner|GetControler|GetPreviousControler|GetReason|GetReasonCard|GetReasonPlayer|GetReasonEffect|GetPosition|GetPreviousPosition|GetBattlePosition|GetLocation|GetPreviousLocation|GetSequence|GetPreviousSequence|GetSummonType|GetSummonLocation|GetSummonPlayer|GetDestination|GetLeaveFieldDest|GetTurnID|GetFieldID|GetRealFieldID|IsOriginalCodeRule|IsCode|IsType|IsFusionType|IsSynchroType|IsXyzType|IsLinkType|IsLevel|IsRank|IsLink|IsAttack|IsDefense|IsRace|IsLinkRace|IsAttribute|IsFusionAttribute|IsLinkAttribute|IsReason|IsSummonType|IsStatus|IsNotTuner|SetStatus|IsDualState|EnableDualState|SetTurnCounter|GetTurnCounter|SetMaterial|GetMaterial|GetMaterialCount|GetEquipGroup|GetEquipCount|GetEquipTarget|GetPreviousEquipTarget|CheckEquipTarget|GetUnionCount|GetOverlayGroup|GetOverlayCount|GetOverlayTarget|CheckRemoveOverlayCard|RemoveOverlayCard|GetAttackedGroup|GetAttackedGroupCount|GetAttackedCount|GetBattledGroup|GetBattledGroupCount|GetAttackAnnouncedCount|IsDirectAttacked|SetCardTarget|GetCardTarget|GetFirstCardTarget|GetCardTargetCount|IsHasCardTarget|CancelCardTarget|GetOwnerTarget|GetOwnerTargetCount|GetActivateEffect|CheckActivateEffect|GetTunerLimit|GetHandSynchro|RegisterEffect|IsHasEffect|ResetEffect|GetEffectCount|RegisterFlagEffect|GetFlagEffect|ResetFlagEffect|SetFlagEffectLabel|GetFlagEffectLabel|CreateRelation|ReleaseRelation|CreateEffectRelation|ReleaseEffectRelation|ClearEffectRelation|IsRelateToEffect|IsRelateToChain|IsRelateToCard|IsRelateToBattle|CopyEffect|ReplaceEffect|EnableReviveLimit|CompleteProcedure|IsDisabled|IsDestructable|IsSummonableCard|IsFusionSummonableCard|IsSpecialSummonable|IsSynchroSummonable|IsXyzSummonable|IsLinkSummonable|IsSummonable|IsMSetable|IsSSetable|IsCanBeSpecialSummoned|IsAbleToHand|IsAbleToDeck|IsAbleToExtra|IsAbleToGrave|IsAbleToRemove|IsAbleToHandAsCost|IsAbleToDeckAsCost|IsAbleToExtraAsCost|IsAbleToDeckOrExtraAsCost|IsAbleToGraveAsCost|IsAbleToRemoveAsCost|IsReleasable|IsReleasableByEffect|IsDiscardable|IsAttackable|IsChainAttackable|IsFaceup|IsAttackPos|IsFacedown|IsDefensePos|IsPosition|IsPreviousPosition|IsControler|IsOnField|IsLocation|IsPreviousLocation|IsLevelBelow|IsLevelAbove|IsRankBelow|IsRankAbove|IsLinkBelow|IsLinkAbove|IsAttackBelow|IsAttackAbove|IsDefenseBelow|IsDefenseAbove|IsPublic|IsForbidden|IsAbleToChangeControler|IsControlerCanBeChanged|AddCounter|RemoveCounter|GetCounter|EnableCounterPermit|SetCounterLimit|IsCanChangePosition|IsCanTurnSet|IsCanAddCounter|IsCanRemoveCounter|IsCanOverlay|IsCanBeFusionMaterial|IsCanBeSynchroMaterial|IsCanBeRitualMaterial|IsCanBeXyzMaterial|IsCanBeLinkMaterial|CheckFusionMaterial|CheckFusionSubstitute|IsImmuneToEffect|IsCanBeEffectTarget|IsCanBeBattleTarget|AddMonsterAttribute|CancelToGrave|GetTributeRequirement|GetBattleTarget|GetAttackableTarget|SetHint|ReverseInDeck|SetUniqueOnField|CheckUniqueOnField|ResetNegateEffect|AssumeProperty|SetSPSummonOnce";
range.SetStyle(this.mFunStyle, $@"\bCard\.({cardFunctions})\b");
range.SetStyle(this.mFunStyle, $@"\b([a-z]{{0,3}}c|a|d):({cardFunctions})\b");
string duelFunctions = @"SelectField|GetMasterRule|ReadCard|Exile|DisableActionCheck|SetMetatable|MoveTurnCount|GetCardsInZone|XyzSummonByRose|LoadScript|AnnounceCardFilter|EnableGlobalFlag|GetLP|SetLP|GetTurnPlayer|GetTurnCount|GetDrawCount|RegisterEffect|RegisterFlagEffect|GetFlagEffect|ResetFlagEffect|SetFlagEffectLabel|GetFlagEffectLabel|Destroy|Remove|SendtoGrave|SendtoHand|SendtoDeck|SendtoExtraP|GetOperatedGroup|Summon|SpecialSummonRule|SynchroSummon|XyzSummon|LinkSummon|MSet|SSet|CreateToken|SpecialSummon|SpecialSummonStep|SpecialSummonComplete|IsCanAddCounter|RemoveCounter|IsCanRemoveCounter|GetCounter|ChangePosition|Release|MoveToField|ReturnToField|MoveSequence|SwapSequence|Activate|SetChainLimit|SetChainLimitTillChainEnd|GetChainMaterial|ConfirmDecktop|ConfirmExtratop|ConfirmCards|SortDecktop|CheckEvent|RaiseEvent|RaiseSingleEvent|CheckTiming|GetEnvironment|IsEnvironment|Win|Draw|Damage|Recover|RDComplete|Equip|EquipComplete|GetControl|SwapControl|CheckLPCost|PayLPCost|DiscardDeck|DiscardHand|DisableShuffleCheck|ShuffleDeck|ShuffleExtra|ShuffleHand|ShuffleSetCard|ChangeAttacker|ChangeAttackTarget|CalculateDamage|GetBattleDamage|ChangeBattleDamage|ChangeTargetCard|ChangeTargetPlayer|ChangeTargetParam|BreakEffect|ChangeChainOperation|NegateActivation|NegateEffect|NegateRelatedChain|NegateSummon|IncreaseSummonedCount|CheckSummonedCount|GetLocationCount|GetMZoneCount|GetLocationCountFromEx|GetUsableMZoneCount|GetLinkedGroup|GetLinkedGroupCount|GetLinkedZone|GetFieldCard|CheckLocation|GetCurrentChain|GetChainInfo|GetChainEvent|GetFirstTarget|GetCurrentPhase|SkipPhase|IsDamageCalculated|GetAttacker|GetAttackTarget|GetBattleMonster|NegateAttack|ChainAttack|Readjust|AdjustInstantly|GetFieldGroup|GetFieldGroupCount|GetDecktopGroup|GetExtraTopGroup|GetMatchingGroup|GetMatchingGroupCount|GetFirstMatchingCard|IsExistingMatchingCard|SelectMatchingCard|GetReleaseGroup|GetReleaseGroupCount|CheckReleaseGroup|SelectReleaseGroup|CheckReleaseGroupEx|SelectReleaseGroupEx|GetTributeGroup|GetTributeCount|CheckTribute|SelectTribute|GetTargetCount|IsExistingTarget|SelectTarget|SelectFusionMaterial|SetFusionMaterial|SetSynchroMaterial|SelectSynchroMaterial|CheckSynchroMaterial|SelectTunerMaterial|CheckTunerMaterial|GetRitualMaterial|ReleaseRitualMaterial|GetFusionMaterial|IsSummonCancelable|SetSelectedCard|GrabSelectedCard|SetTargetCard|ClearTargetCard|SetTargetPlayer|SetTargetParam|SetOperationInfo|GetOperationInfo|GetOperationCount|ClearOperationInfo|CheckXyzMaterial|SelectXyzMaterial|Overlay|GetOverlayGroup|GetOverlayCount|CheckRemoveOverlayCard|RemoveOverlayCard|Hint|HintSelection|SelectEffectYesNo|SelectYesNo|SelectOption|SelectSequence|SelectPosition|SelectDisableField|AnnounceRace|AnnounceAttribute|AnnounceLevel|AnnounceCard|AnnounceType|AnnounceNumber|AnnounceCoin|TossCoin|TossDice|RockPaperScissors|GetCoinResult|GetDiceResult|SetCoinResult|SetDiceResult|IsPlayerAffectedByEffect|IsPlayerCanDraw|IsPlayerCanDiscardDeck|IsPlayerCanDiscardDeckAsCost|IsPlayerCanSummon|IsPlayerCanMSet|IsPlayerCanSSet|IsPlayerCanSpecialSummon|IsPlayerCanFlipSummon|IsPlayerCanSpecialSummonMonster|IsPlayerCanSpecialSummonCount|IsPlayerCanRelease|IsPlayerCanRemove|IsPlayerCanSendtoHand|IsPlayerCanSendtoGrave|IsPlayerCanSendtoDeck|IsPlayerCanAdditionalSummon|IsChainNegatable|IsChainDisablable|CheckChainTarget|CheckChainUniqueness|GetActivityCount|CheckPhaseActivity|AddCustomActivityCounter|GetCustomActivityCount|GetBattledCount|IsAbleToEnterBP|SwapDeckAndGrave|MajesticCopy";
range.SetStyle(this.mFunStyle, $@"\bDuel\.({duelFunctions})\b");
string groupFunctions = @"CreateGroup|FromCards|KeepAlive|DeleteGroup|Clone|Clear|AddCard|Merge|RemoveCard|Sub|GetNext|GetFirst|GetCount|__len|ForEach|Filter|FilterCount|FilterSelect|Select|SelectUnselect|RandomSelect|IsExists|CheckWithSumEqual|SelectWithSumEqual|CheckWithSumGreater|SelectWithSumGreater|GetMinGroup|GetMaxGroup|GetSum|GetClassCount|Remove|Equal|IsContains|SearchCard|GetBinClassCount|__add|__bor|__sub|__band|__bxor";
range.SetStyle(this.mFunStyle, $@"\bGroup\.({groupFunctions})\b");
range.SetStyle(this.mFunStyle, $@"\b[a-z]{{0,3}}g[0-9]{{0,2}}:({groupFunctions})\b");
string effectFunctions = @"SetOwner|GetRange|GetCountLimit|CreateEffect|GlobalEffect|Clone|Reset|GetFieldID|SetDescription|SetCode|SetRange|SetTargetRange|SetAbsoluteRange|SetCountLimit|SetReset|SetType|SetProperty|SetLabel|SetLabelObject|SetCategory|SetHintTiming|SetCondition|SetTarget|SetCost|SetValue|SetOperation|SetOwnerPlayer|GetDescription|GetCode|GetType|GetProperty|GetLabel|GetLabelObject|GetCategory|GetOwner|GetHandler|GetCondition|GetTarget|GetCost|GetValue|GetOperation|GetActiveType|IsActiveType|GetOwnerPlayer|GetHandlerPlayer|IsHasProperty|IsHasCategory|IsHasType|IsActivatable|IsActivated|GetActivateLocation|GetActivateSequence|CheckCountLimit|UseCountLimit";
range.SetStyle(this.mFunStyle, $@"\bEffect\.({effectFunctions})\b");
string rrr = $@"\b[a-z]{{0,1}}e[0-9v]{{0,2}}:({effectFunctions})\b";
range.SetStyle(this.mFunStyle, rrr);
string debugFunctions = @"Message|AddCard|SetPlayerInfo|PreSummon|PreEquip|PreSetTarget|PreAddCounter|ReloadFieldBegin|ReloadFieldEnd|SetAIName|ShowHint";
range.SetStyle(this.mFunStyle, $@"\bDebug\.({debugFunctions})\b");
string auxFunctions = @"bit.band|bit.bor|bit.bxor|bit.lshift|bit.rshift|bit.bnot|bit.extract|bit.replace|Auxiliary.Stringid|Auxiliary.Next|Auxiliary.NULL|Auxiliary.TRUE|Auxiliary.FALSE|Auxiliary.AND|Auxiliary.OR|Auxiliary.NOT|Auxiliary.BeginPuzzle|Auxiliary.PuzzleOp|Auxiliary.IsDualState|Auxiliary.IsNotDualState|Auxiliary.DualNormalCondition|Auxiliary.EnableDualAttribute|Auxiliary.EnableSpiritReturn|Auxiliary.SpiritReturnReg|Auxiliary.SpiritReturnCondition|Auxiliary.SpiritReturnTarget|Auxiliary.SpiritReturnOperation|Auxiliary.IsUnionState|Auxiliary.SetUnionState|Auxiliary.CheckUnionEquip|Auxiliary.TargetEqualFunction|Auxiliary.TargetBoolFunction|Auxiliary.FilterEqualFunction|Auxiliary.FilterBoolFunction|Auxiliary.Tuner|Auxiliary.NonTuner|Auxiliary.GetValueType|Auxiliary.GetMustMaterialGroup|Auxiliary.MustMaterialCheck|Auxiliary.MustMaterialCounterFilter|Auxiliary.AddSynchroProcedure|Auxiliary.SynCondition|Auxiliary.SynTarget|Auxiliary.SynOperation|Auxiliary.AddSynchroMixProcedure|Auxiliary.SynMaterialFilter|Auxiliary.SynLimitFilter|Auxiliary.GetSynchroLevelFlowerCardian|Auxiliary.GetSynMaterials|Auxiliary.SynMixCondition|Auxiliary.SynMixTarget|Auxiliary.SynMixOperation|Auxiliary.SynMixCheck|Auxiliary.SynMixCheckRecursive|Auxiliary.SynMixCheckGoal|Auxiliary.TuneMagicianFilter|Auxiliary.TuneMagicianCheckX|Auxiliary.TuneMagicianCheckAdditionalX|Auxiliary.XyzAlterFilter|Auxiliary.AddXyzProcedure|Auxiliary.XyzCondition|Auxiliary.XyzTarget|Auxiliary.XyzOperation|Auxiliary.AddXyzProcedureLevelFree|Auxiliary.XyzLevelFreeFilter|Auxiliary.XyzLevelFreeGoal|Auxiliary.XyzLevelFreeCondition|Auxiliary.XyzLevelFreeTarget|Auxiliary.XyzLevelFreeOperation|Auxiliary.AddFusionProcMix|Auxiliary.FConditionMix|Auxiliary.FOperationMix|Auxiliary.FConditionFilterMix|Auxiliary.FCheckMix|Auxiliary.FCheckMixGoal|Auxiliary.AddFusionProcMixRep|Auxiliary.FConditionMixRep|Auxiliary.FOperationMixRep|Auxiliary.FCheckMixRep|Auxiliary.FCheckMixRepFilter|Auxiliary.FCheckMixRepGoal|Auxiliary.FCheckMixRepTemplate|Auxiliary.FCheckMixRepSelectedCond|Auxiliary.FCheckMixRepSelected|Auxiliary.FCheckSelectMixRep|Auxiliary.FCheckSelectMixRepAll|Auxiliary.FCheckSelectMixRepM|Auxiliary.FSelectMixRep|Auxiliary.AddFusionProcCodeRep|Auxiliary.AddFusionProcCodeFun|Auxiliary.AddFusionProcFunRep|Auxiliary.AddFusionProcFunFun|Auxiliary.AddFusionProcFunFunRep|Auxiliary.AddFusionProcCodeFunRep|Auxiliary.AddFusionProcShaddoll|Auxiliary.FShaddollFilter|Auxiliary.FShaddollExFilter|Auxiliary.FShaddollCondition|Auxiliary.FShaddollOperation|Auxiliary.AddContactFusionProcedure|Auxiliary.ContactFusionMaterialFilter|Auxiliary.ContactFusionCondition|Auxiliary.ContactFusionOperation|Auxiliary.AddRitualProcUltimate|Auxiliary.RitualCheckGreater|Auxiliary.RitualCheckEqual|Auxiliary.RitualCheck|Auxiliary.RitualCheckAdditionalLevel|Auxiliary.RitualCheckAdditional|Auxiliary.RitualUltimateFilter|Auxiliary.RitualExtraFilter|Auxiliary.RitualUltimateTarget|Auxiliary.RitualUltimateOperation|Auxiliary.AddRitualProcGreater|Auxiliary.AddRitualProcGreaterCode|Auxiliary.AddRitualProcEqual|Auxiliary.AddRitualProcEqualCode|Auxiliary.EnablePendulumAttribute|Auxiliary.PendulumReset|Auxiliary.PConditionExtraFilterSpecific|Auxiliary.PConditionExtraFilter|Auxiliary.PConditionFilter|Auxiliary.PendCondition|Auxiliary.PendOperationCheck|Auxiliary.PendOperation|Auxiliary.EnableReviveLimitPendulumSummonable|Auxiliary.PendulumSummonableBool|Auxiliary.PSSCompleteProcedure|Auxiliary.AddLinkProcedure|Auxiliary.LConditionFilter|Auxiliary.LExtraFilter|Auxiliary.GetLinkCount|Auxiliary.GetLinkMaterials|Auxiliary.LCheckOtherMaterial|Auxiliary.LUncompatibilityFilter|Auxiliary.LCheckGoal|Auxiliary.LExtraMaterialCount|Auxiliary.LinkCondition|Auxiliary.LinkTarget|Auxiliary.LinkOperation|Auxiliary.EnableExtraDeckSummonCountLimit|Auxiliary.ExtraDeckSummonCountLimitReset|Auxiliary.IsMaterialListCode|Auxiliary.IsMaterialListSetCard|Auxiliary.IsMaterialListType|Auxiliary.AddCodeList|Auxiliary.IsCodeListed|Auxiliary.IsCounterAdded|Auxiliary.IsInGroup|Auxiliary.GetColumn|Auxiliary.MZoneSequence|Auxiliary.SZoneSequence|Auxiliary.ChangeBattleDamage|Auxiliary.bdcon|Auxiliary.bdocon|Auxiliary.bdgcon|Auxiliary.bdogcon|Auxiliary.dogcon|Auxiliary.dogfcon|Auxiliary.exccon|Auxiliary.bpcon|Auxiliary.dscon|Auxiliary.chainreg|Auxiliary.indsval|Auxiliary.indoval|Auxiliary.tgsval|Auxiliary.tgoval|Auxiliary.nzatk|Auxiliary.nzdef|Auxiliary.sumreg|Auxiliary.fuslimit|Auxiliary.ritlimit|Auxiliary.synlimit|Auxiliary.xyzlimit|Auxiliary.penlimit|Auxiliary.linklimit|Auxiliary.qlifilter|Auxiliary.gbspcon|Auxiliary.evospcon|Auxiliary.NecroValleyFilter|Auxiliary.bfgcost|Auxiliary.dncheck|Auxiliary.dlvcheck|Auxiliary.drkcheck|Auxiliary.dlkcheck|Auxiliary.dabcheck|Auxiliary.drccheck|Auxiliary.gfcheck|Auxiliary.gffcheck|Auxiliary.mzctcheck|Auxiliary.mzctcheckrel|Auxiliary.ExceptThisCard|Auxiliary.GetMultiLinkedZone|Auxiliary.CheckGroupRecursive|Auxiliary.CheckGroupRecursiveCapture|Group.CheckSubGroup|Group.SelectSubGroup|Auxiliary.CreateChecks|Auxiliary.CheckGroupRecursiveEach|Group.CheckSubGroupEach|Group.SelectSubGroupEach|Auxiliary.nbcon|Auxiliary.tdcfop|bit.band|bit.bor|bit.bxor|bit.lshift|bit.rshift|bit.bnot|bit.extract|bit.replace|aux.Stringid|aux.Next|aux.NULL|aux.TRUE|aux.FALSE|aux.AND|aux.OR|aux.NOT|aux.BeginPuzzle|aux.PuzzleOp|aux.IsDualState|aux.IsNotDualState|aux.DualNormalCondition|aux.EnableDualAttribute|aux.EnableSpiritReturn|aux.SpiritReturnReg|aux.SpiritReturnCondition|aux.SpiritReturnTarget|aux.SpiritReturnOperation|aux.IsUnionState|aux.SetUnionState|aux.CheckUnionEquip|aux.TargetEqualFunction|aux.TargetBoolFunction|aux.FilterEqualFunction|aux.FilterBoolFunction|aux.Tuner|aux.NonTuner|aux.GetValueType|aux.GetMustMaterialGroup|aux.MustMaterialCheck|aux.MustMaterialCounterFilter|aux.AddSynchroProcedure|aux.SynCondition|aux.SynTarget|aux.SynOperation|aux.AddSynchroMixProcedure|aux.SynMaterialFilter|aux.SynLimitFilter|aux.GetSynchroLevelFlowerCardian|aux.GetSynMaterials|aux.SynMixCondition|aux.SynMixTarget|aux.SynMixOperation|aux.SynMixCheck|aux.SynMixCheckRecursive|aux.SynMixCheckGoal|aux.TuneMagicianFilter|aux.TuneMagicianCheckX|aux.TuneMagicianCheckAdditionalX|aux.XyzAlterFilter|aux.AddXyzProcedure|aux.XyzCondition|aux.XyzTarget|aux.XyzOperation|aux.AddXyzProcedureLevelFree|aux.XyzLevelFreeFilter|aux.XyzLevelFreeGoal|aux.XyzLevelFreeCondition|aux.XyzLevelFreeTarget|aux.XyzLevelFreeOperation|aux.AddFusionProcMix|aux.FConditionMix|aux.FOperationMix|aux.FConditionFilterMix|aux.FCheckMix|aux.FCheckMixGoal|aux.AddFusionProcMixRep|aux.FConditionMixRep|aux.FOperationMixRep|aux.FCheckMixRep|aux.FCheckMixRepFilter|aux.FCheckMixRepGoal|aux.FCheckMixRepTemplate|aux.FCheckMixRepSelectedCond|aux.FCheckMixRepSelected|aux.FCheckSelectMixRep|aux.FCheckSelectMixRepAll|aux.FCheckSelectMixRepM|aux.FSelectMixRep|aux.AddFusionProcCodeRep|aux.AddFusionProcCodeFun|aux.AddFusionProcFunRep|aux.AddFusionProcFunFun|aux.AddFusionProcFunFunRep|aux.AddFusionProcCodeFunRep|aux.AddFusionProcShaddoll|aux.FShaddollFilter|aux.FShaddollExFilter|aux.FShaddollCondition|aux.FShaddollOperation|aux.AddContactFusionProcedure|aux.ContactFusionMaterialFilter|aux.ContactFusionCondition|aux.ContactFusionOperation|aux.AddRitualProcUltimate|aux.RitualCheckGreater|aux.RitualCheckEqual|aux.RitualCheck|aux.RitualCheckAdditionalLevel|aux.RitualCheckAdditional|aux.RitualUltimateFilter|aux.RitualExtraFilter|aux.RitualUltimateTarget|aux.RitualUltimateOperation|aux.AddRitualProcGreater|aux.AddRitualProcGreaterCode|aux.AddRitualProcEqual|aux.AddRitualProcEqualCode|aux.EnablePendulumAttribute|aux.PendulumReset|aux.PConditionExtraFilterSpecific|aux.PConditionExtraFilter|aux.PConditionFilter|aux.PendCondition|aux.PendOperationCheck|aux.PendOperation|aux.EnableReviveLimitPendulumSummonable|aux.PendulumSummonableBool|aux.PSSCompleteProcedure|aux.AddLinkProcedure|aux.LConditionFilter|aux.LExtraFilter|aux.GetLinkCount|aux.GetLinkMaterials|aux.LCheckOtherMaterial|aux.LUncompatibilityFilter|aux.LCheckGoal|aux.LExtraMaterialCount|aux.LinkCondition|aux.LinkTarget|aux.LinkOperation|aux.EnableExtraDeckSummonCountLimit|aux.ExtraDeckSummonCountLimitReset|aux.IsMaterialListCode|aux.IsMaterialListSetCard|aux.IsMaterialListType|aux.AddCodeList|aux.IsCodeListed|aux.IsCounterAdded|aux.IsInGroup|aux.GetColumn|aux.MZoneSequence|aux.SZoneSequence|aux.ChangeBattleDamage|aux.bdcon|aux.bdocon|aux.bdgcon|aux.bdogcon|aux.dogcon|aux.dogfcon|aux.exccon|aux.bpcon|aux.dscon|aux.chainreg|aux.indsval|aux.indoval|aux.tgsval|aux.tgoval|aux.nzatk|aux.nzdef|aux.sumreg|aux.fuslimit|aux.ritlimit|aux.synlimit|aux.xyzlimit|aux.penlimit|aux.linklimit|aux.qlifilter|aux.gbspcon|aux.evospcon|aux.NecroValleyFilter|aux.bfgcost|aux.dncheck|aux.dlvcheck|aux.drkcheck|aux.dlkcheck|aux.dabcheck|aux.drccheck|aux.gfcheck|aux.gffcheck|aux.mzctcheck|aux.mzctcheckrel|aux.ExceptThisCard|aux.GetMultiLinkedZone|aux.CheckGroupRecursive|aux.CheckGroupRecursiveCapture|Group.CheckSubGroup|Group.SelectSubGroup|aux.CreateChecks|aux.CheckGroupRecursiveEach|Group.CheckSubGroupEach|Group.SelectSubGroupEach|aux.nbcon|aux.tdcfop";
range.SetStyle(this.mFunStyle, $@"\b({auxFunctions})\b");
range.SetStyle(this.conStyle, @"[\s|\(|+|,]{0,1}(?<range>[A-Z_]+?)[\)|+|\s|,|;]");
//range.SetStyle(mFunStyle, @"[:|\.|\s](?<range>[a-zA-Z0-9_]*?)[\(|\)|\s]");
//string highlighting
range.SetStyle(this.mStrStyle, this.LuaStringRegex);
//errors highlighting
List<string> errorRegexes = new List<string>();
this.InitErrorRegexes(ref errorRegexes);
foreach (string regex in errorRegexes)
{
range.SetStyle(this.mErrorStyle, regex);
}
//clear folding markers
range.ClearFoldingMarkers();
//set folding markers
range.SetFoldingMarkers("{", "}"); //allow to collapse brackets block
range.SetFoldingMarkers(@"--\[\[", @"\]\]"); //allow to collapse comment block
}
private void InitErrorRegexes(ref List<string> errorRegexes)
{
errorRegexes.Add(@"\b(Duel\.[A-Za-z_0-9]+)\b");
errorRegexes.Add(@"\b(Card\.[A-Za-z_0-9]+)\b");
errorRegexes.Add(@"\b(Group\.[A-Za-z_0-9]+)\b");
errorRegexes.Add(@"\b(Effect\.[A-Za-z_0-9]+)\b");
errorRegexes.Add(@"\b(Debug\.[A-Za-z_0-9]+)\b");
errorRegexes.Add(@"\b(Auxiliary\.[A-Za-z_0-9]+)\b");
errorRegexes.Add(@"\b(aux\.[A-Za-z_0-9]+)\b");
errorRegexes.Add(@"\b([a-z]{0,3}c|a|d):([A-Za-z_0-9]+)\b");
errorRegexes.Add(@"\b[a-z]{0,3}g[0-9]{0,2}:([A-Za-z_0-9]+)\b");
errorRegexes.Add(@"\b[a-z]{0,1}e[0-9v]{0,2}:([A-Za-z_0-9]+)\b");
errorRegexes.Add(@"\be[0-9v][0-9]{0,1}:([A-Za-z_0-9]+)\b");
errorRegexes.Add(@"\bc[0-9]+\b");
}
}
private void InitErrorRegexes(ref List<string> errorRegexes)
{
errorRegexes.Add(@"\b(Duel\.[A-Za-z_0-9]+)\b");
errorRegexes.Add(@"\b(Card\.[A-Za-z_0-9]+)\b");
errorRegexes.Add(@"\b(Group\.[A-Za-z_0-9]+)\b");
errorRegexes.Add(@"\b(Effect\.[A-Za-z_0-9]+)\b");
errorRegexes.Add(@"\b(Debug\.[A-Za-z_0-9]+)\b");
errorRegexes.Add(@"\b(Auxiliary\.[A-Za-z_0-9]+)\b");
errorRegexes.Add(@"\b(aux\.[A-Za-z_0-9]+)\b");
errorRegexes.Add(@"\b([a-z]{0,3}c|a|d):([A-Za-z_0-9]+)\b");
errorRegexes.Add(@"\b[a-z]{0,3}g[0-9]{0,2}:([A-Za-z_0-9]+)\b");
errorRegexes.Add(@"\b[a-z]{0,1}e[0-9v]{0,2}:([A-Za-z_0-9]+)\b");
errorRegexes.Add(@"\be[0-9v][0-9]{0,1}:([A-Za-z_0-9]+)\b");
errorRegexes.Add(@"\bc[0-9]+\b");
}
}
}
......@@ -155,6 +155,12 @@
<Compile Include="DataEditForm.Designer.cs">
<DependentUpon>DataEditForm.cs</DependentUpon>
</Compile>
<Compile Include="EffectCreatorForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="EffectCreatorForm.Designer.cs">
<DependentUpon>EffectCreatorForm.cs</DependentUpon>
</Compile>
<Compile Include="Language\LanguageHelper.cs" />
<Compile Include="Language\LMsg.cs" />
<Compile Include="Language\MyMsg.cs" />
......@@ -171,6 +177,9 @@
<Content Include="changed.txt">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="data\effect_creator_settings.txt">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="data\mse_Chinese-Traditional.txt">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
......@@ -234,6 +243,9 @@
<EmbeddedResource Include="DataEditForm.resx">
<DependentUpon>DataEditForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="EffectCreatorForm.resx">
<DependentUpon>EffectCreatorForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="MainForm.resx">
<DependentUpon>MainForm.cs</DependentUpon>
</EmbeddedResource>
......
namespace DataEditorX
{
partial class EffectCreatorForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.textBox1 = new System.Windows.Forms.TextBox();
this.listEffectCode = new System.Windows.Forms.CheckedListBox();
this.gbSpecialOptions = new System.Windows.Forms.GroupBox();
this.checkEnableReviveLimit = new System.Windows.Forms.CheckBox();
this.gbEffectType = new System.Windows.Forms.GroupBox();
this.gbSpecialOptions.SuspendLayout();
this.gbEffectType.SuspendLayout();
this.SuspendLayout();
//
// textBox1
//
this.textBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.textBox1.Location = new System.Drawing.Point(721, 12);
this.textBox1.Multiline = true;
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(293, 441);
this.textBox1.TabIndex = 0;
//
// listEffectCode
//
this.listEffectCode.FormattingEnabled = true;
this.listEffectCode.Location = new System.Drawing.Point(6, 20);
this.listEffectCode.Name = "listEffectCode";
this.listEffectCode.Size = new System.Drawing.Size(251, 132);
this.listEffectCode.TabIndex = 1;
//
// gbSpecialOptions
//
this.gbSpecialOptions.Controls.Add(this.checkEnableReviveLimit);
this.gbSpecialOptions.Location = new System.Drawing.Point(12, 12);
this.gbSpecialOptions.Name = "gbSpecialOptions";
this.gbSpecialOptions.Size = new System.Drawing.Size(148, 54);
this.gbSpecialOptions.TabIndex = 2;
this.gbSpecialOptions.TabStop = false;
this.gbSpecialOptions.Text = "特殊选项";
//
// checkEnableReviveLimit
//
this.checkEnableReviveLimit.AutoSize = true;
this.checkEnableReviveLimit.Location = new System.Drawing.Point(6, 20);
this.checkEnableReviveLimit.Name = "checkEnableReviveLimit";
this.checkEnableReviveLimit.Size = new System.Drawing.Size(96, 16);
this.checkEnableReviveLimit.TabIndex = 0;
this.checkEnableReviveLimit.Text = "开启召唤限制";
this.checkEnableReviveLimit.UseVisualStyleBackColor = true;
//
// gbEffectType
//
this.gbEffectType.Controls.Add(this.listEffectCode);
this.gbEffectType.Location = new System.Drawing.Point(166, 12);
this.gbEffectType.Name = "gbEffectType";
this.gbEffectType.Size = new System.Drawing.Size(263, 173);
this.gbEffectType.TabIndex = 3;
this.gbEffectType.TabStop = false;
this.gbEffectType.Text = "效果种类";
//
// EffectCreatorForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1026, 465);
this.Controls.Add(this.gbEffectType);
this.Controls.Add(this.gbSpecialOptions);
this.Controls.Add(this.textBox1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
this.Name = "EffectCreatorForm";
this.TabText = "Effect Creator";
this.Text = "Effect Creator";
this.TopMost = true;
this.Load += new System.EventHandler(this.EffectCreatorForm_Load);
this.gbSpecialOptions.ResumeLayout(false);
this.gbSpecialOptions.PerformLayout();
this.gbEffectType.ResumeLayout(false);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.CheckedListBox listEffectCode;
private System.Windows.Forms.GroupBox gbSpecialOptions;
private System.Windows.Forms.CheckBox checkEnableReviveLimit;
private System.Windows.Forms.GroupBox gbEffectType;
}
}
\ No newline at end of file
using System;
using System.Collections.Generic;
using System.IO;
using WeifenLuo.WinFormsUI.Docking;
namespace DataEditorX
{
public partial class EffectCreatorForm : DockContent
{
public EffectCreatorForm()
{
this.InitializeComponent();
}
class EffectCreatorItem
{
public string Key;
public string Value;
public string Hint;
public EffectCreatorItem(string key, string value)
{
this.Key = key ?? throw new ArgumentNullException(nameof(key));
this.Value = value;
}
public EffectCreatorItem(string key, string value, string hint) : this(key, value)
{
this.Hint = hint;
}
public override string ToString()
{
return Value;
}
}
Dictionary<string, List<EffectCreatorItem>> itemDic = new Dictionary<string, List<EffectCreatorItem>>();
private void EffectCreatorForm_Load(object sender, EventArgs e)
{
string config = $"data{Path.DirectorySeparatorChar}effect_creator_settings.txt";
if (!File.Exists(config))
{
return;
}
char[] sepChars = new char[]{' ','\t',' '};
FileStream fs = new FileStream(config,FileMode.Open);
StreamReader sr = new StreamReader(fs);
string nowType = "";
for (string line = sr.ReadLine(); line != null; line = sr.ReadLine())
{
line = line.Trim();
if (line.StartsWith("!"))
{
nowType = line.Substring(1);
if (!itemDic.ContainsKey(nowType))
{
itemDic.Add(nowType, new List<EffectCreatorItem>());
}
continue;
}
if (line.StartsWith("#"))
{
continue;
}
string[] split = line.Split(sepChars,StringSplitOptions.RemoveEmptyEntries);
if (split.Length == 2)
{
itemDic[nowType].Add(new EffectCreatorItem(split[0], split[1]));
}
if (split.Length == 3)
{
itemDic[nowType].Add(new EffectCreatorItem(split[0], split[1], split[2]));
}
}
foreach (var item in itemDic["EFFECT_CODES"])
{
listEffectCode.Items.Add(item);
}
foreach (var item in itemDic["EVENT_CODES"])
{
listEffectCode.Items.Add(item);
}
}
}
}
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
\ No newline at end of file
#Effect Creator setting file
#Use '#' at the start of a line to write a single-line comment.
!EFFECT_CODES
EFFECT_IMMUNE_EFFECT 目标卡不受效果影响
EFFECT_DISABLE 目标卡的效果无效
EFFECT_DISABLE_EFFECT 目标效果无效
EFFECT_CANNOT_DISABLE 目标效果不能被无效
EFFECT_CANNOT_INACTIVATE 目标卡的发动不会被无效化
EFFECT_CANNOT_DISEFFECT 目标卡的效果不会被无效化
EFFECT_SET_CONTROL 目标卡设置控制权
EFFECT_CANNOT_CHANGE_CONTROL 目标卡的控制权不能变更
EFFECT_CANNOT_ACTIVATE 目标卡不能把效果发动
EFFECT_CANNOT_TRIGGER 目标卡不能把效果发动
EFFECT_DISABLE_TRAPMONSTER 目标卡作为陷阱怪兽无效
EFFECT_CANNOT_CHANGE_POSITION 目标卡不能改变表示形式
EFFECT_TRAP_ACT_IN_HAND 目标玩家陷阱可以从手牌发动
EFFECT_TRAP_ACT_IN_SET_TURN 目标玩家陷阱可以在盖放的回合发动
EFFECT_REMAIN_FIELD 目标卡发动后继续留在场上
EFFECT_MONSTER_SSET 目标卡可以当作魔法/陷阱卡使用从手卡到魔法与陷阱卡区域盖放
EFFECT_CANNOT_SUMMON 目标玩家不能把怪兽召唤 不是不能通常召唤,要另写一个不能把怪兽盖放的效果
EFFECT_CANNOT_FLIP_SUMMON 目标玩家不能把怪兽反转召唤
EFFECT_CANNOT_SPECIAL_SUMMON 目标玩家不能把怪兽特殊召唤
EFFECT_CANNOT_MSET 目标玩家不能把怪兽盖放 不是不能通常召唤,要另写一个不能把怪兽召唤的效果;推荐检查EFFECT_CANNOT_TURN_SET
EFFECT_CANNOT_SSET 目标玩家不能把魔法陷阱卡盖放 推荐检查EFFECT_CANNOT_TURN_SET
EFFECT_CANNOT_DRAW 目标玩家不能抽卡
EFFECT_CANNOT_DISABLE_SUMMON 目标卡的召唤不会被无效化
EFFECT_CANNOT_DISABLE_SPSUMMON 目标卡的特殊召唤不会被无效化
EFFECT_SET_SUMMON_COUNT_LIMIT 目标玩家可以进行通常召唤最多X次
EFFECT_EXTRA_SUMMON_COUNT 目标玩家在通常召唤外加上只有X次可以把怪兽召唤 要加上EFFECT_EXTRA_SET_COUNT才是完整的通常召唤
EFFECT_SPSUMMON_CONDITION 目标卡(召唤条件)才能特殊召唤 这只是加上了不能正常特殊召唤的标签,正规特召方法要另用EFFECT_SPSUMMON_PROC写
EFFECT_REVIVE_LIMIT 目标卡不能通常召唤 一般用不到,直接调用c:EnableReviveLimit()即可
EFFECT_SUMMON_PROC 目标卡通常召唤的场合,可以(召唤条件)
EFFECT_LIMIT_SUMMON_PROC 目标卡通常召唤的场合,必须(召唤条件)
EFFECT_SPSUMMON_PROC_G 目标卡灵摆召唤的场合,必须(召唤条件)
EFFECT_SET_PROC 目标卡通常召唤盖放的场合,可以(召唤条件)
EFFECT_LIMIT_SET_PROC 目标卡通常召唤盖放的场合,必须(召唤条件)
EFFECT_SPSUMMON_PROC 目标卡可以(召唤条件)特殊召唤
EFFECT_EXTRA_SET_COUNT 目标玩家在通常召唤外加上只有X次可以把怪兽盖放 要加上EFFECT_EXTRA_SUMMON_COUNT才是完整的通常召唤
EFFECT_CANNOT_DISABLE_FLIP_SUMMON 目标卡反转召唤不会无效化
EFFECT_INDESTRUCTABLE 目标卡不会被破坏
EFFECT_INDESTRUCTABLE_EFFECT 目标卡不会被效果破坏
EFFECT_INDESTRUCTABLE_BATTLE 目标卡不会被战斗破坏
EFFECT_UNRELEASABLE_SUM 目标卡不能作为上级召唤的解放
EFFECT_UNRELEASABLE_NONSUM 目标卡不能为上级召唤以外而解放
EFFECT_DESTROY_SUBSTITUTE 目标卡被破坏的场合,作为代替(代替动作)
EFFECT_CANNOT_RELEASE 目标卡不能解放
EFFECT_INDESTRUCTABLE_COUNT 目标卡一回合只有X次不会被破坏
EFFECT_UNRELEASABLE_EFFECT 目标卡不能用效果解放
EFFECT_DESTROY_REPLACE 目标卡被破坏的场合,可以作为代替(代替动作)
EFFECT_RELEASE_REPLACE 目标卡解放的场合,可以作为代替(代替动作)
EFFECT_SEND_REPLACE 目标卡送去(位置1)的场合,可以不送去(位置1)送去(位置2)
EFFECT_CANNOT_DISCARD_HAND 目标玩家不能把手卡丢弃
EFFECT_CANNOT_DISCARD_DECK 目标玩家不能从卡组把卡送去墓地
EFFECT_CANNOT_USE_AS_COST 目标卡不能作为COST使用
EFFECT_CANNOT_PLACE_COUNTER 目标玩家不能给场上的卡放置指示物
EFFECT_CANNOT_TO_GRAVE_AS_COST 目标玩家不能把卡送去墓地来让卡的效果发动
EFFECT_LEAVE_FIELD_REDIRECT 目标卡从场上离开的场合(重新指定去向)
EFFECT_TO_HAND_REDIRECT 目标卡回到手卡的场合不回到手卡(重新指定去向)
EFFECT_TO_DECK_REDIRECT 目标卡回到卡组的场合不回到卡组(重新指定去向)
EFFECT_TO_GRAVE_REDIRECT 目标卡送去墓地的场合(重新指定去向)
EFFECT_TO_GRAVE_REDIRECT_CB 目标卡在怪兽区域被破坏的场合,可以不送去墓地当作永续魔法卡使用在自己的魔法与陷阱区域表侧表示放置
EFFECT_REMOVE_REDIRECT 目标卡从游戏除外的场合(重新指定去向)
EFFECT_BATTLE_DESTROY_REDIRECT 目标卡战斗破坏对方怪兽的场合,破坏的那只怪兽不送去墓地(重新指定去向)
EFFECT_CANNOT_TO_HAND 目标玩家不能把卡加入手卡
EFFECT_CANNOT_TO_DECK 目标玩家不能让卡回到卡组
EFFECT_CANNOT_REMOVE 目标玩家不能把卡除外
EFFECT_CANNOT_TO_GRAVE 目标玩家不能把卡送去墓地
EFFECT_CANNOT_TURN_SET 目标玩家不能把卡转为里侧 一般用于“不能把卡盖放”,检查EFFECT_CANNOT_MSET和EFFECT_CANNOT_SSET。
EFFECT_CANNOT_BE_BATTLE_TARGET 目标卡不能选择目标卡作为攻击对象
EFFECT_CANNOT_BE_EFFECT_TARGET 目标卡不会成为效果的对象
EFFECT_IGNORE_BATTLE_TARGET 目标卡不会成为攻击对象(自己场上只有这个效果适用的怪兽存在的状态中的对方的攻击变成对自己的直接攻击。)
EFFECT_CANNOT_SELECT_BATTLE_TARGET 目标玩家不能选择攻击对象
EFFECT_CANNOT_SELECT_EFFECT_TARGET 目标玩家不能选择效果的对象
EFFECT_CANNOT_DIRECT_ATTACK 目标卡不能直接攻击
EFFECT_DIRECT_ATTACK 目标卡可以直接攻击对方玩家
EFFECT_DUAL_STATUS 目标卡当作再1次召唤的状态使用
EFFECT_EQUIP_LIMIT 目标卡必须由(装备条件)才能装备 对装备卡的限制(比如传说之剑);另外如同盟运输车等卡片装备的怪兽也要加上这个效果
EFFECT_DUAL_SUMMONABLE 目标卡可以当作通常召唤作再度召唤
EFFECT_REVERSE_DAMAGE 目标玩家作为自己因战斗以及卡的效果受到伤害的代替回复基本分
EFFECT_REVERSE_RECOVER 目标玩家基本分回复效果变成给与目标玩家基本分伤害效果
EFFECT_CHANGE_DAMAGE 目标玩家受到的伤害变成(新数值)
EFFECT_REFLECT_DAMAGE 目标玩家(受到)的伤害由对方代受
EFFECT_CANNOT_ATTACK 目标卡不能攻击
EFFECT_CANNOT_ATTACK_ANNOUNCE 目标卡不能攻击宣言
EFFECT_CANNOT_CHANGE_POS_E 目标卡不会被卡的效果变更表示形式
EFFECT_ACTIVATE_COST 目标玩家若不(支付某种代价)不能把卡发动
EFFECT_SUMMON_COST 目标玩家若不(支付某种代价)不能把卡召唤
EFFECT_SPSUMMON_COST 目标玩家若不(支付某种代价)不能把卡特殊召唤
EFFECT_FLIPSUMMON_COST 目标玩家若不(支付某种代价)不能把卡反转召唤
EFFECT_MSET_COST 目标玩家若不(支付某种代价)不能把怪兽盖放
EFFECT_SSET_COST 目标玩家若不(支付某种代价)不能把魔法陷阱卡盖放
EFFECT_ATTACK_COST 目标卡若不(支付某种代价)不能攻击
EFFECT_UPDATE_ATTACK 目标卡攻击力上升/下降 正数上升,负数下降
EFFECT_SET_ATTACK 目标卡攻击力变成(低优先级) 用于如召唤时就决定好攻击力的场合;被覆盖后不会复原
EFFECT_SET_ATTACK_FINAL 目标卡攻击力变成(高优先级) 用于类似“直到回合结束变成0”的效果
EFFECT_SET_BASE_ATTACK 目标卡原本攻击力变成
EFFECT_UPDATE_DEFENSE 目标卡守备力上升/下降 正数上升,负数下降
EFFECT_SET_DEFENSE 目标卡守备力变成(低优先级) 用于如召唤时就决定好守备力的场合;被覆盖后不会复原
EFFECT_SET_DEFENSE_FINAL 目标卡守备力变成(高优先级) 用于类似“直到回合结束变成0”的效果
EFFECT_SET_BASE_DEFENSE 目标卡原本守备力变成
EFFECT_REVERSE_UPDATE 目标玩家攻击力·守备力的上升·下降的效果变成逆向
EFFECT_SWAP_AD 目标卡攻击力·守备力交换
EFFECT_SWAP_BASE_AD 目标卡原本攻击力·守备力交换
EFFECT_ADD_CODE 目标卡卡名在规则上也当作(某张卡片)使用
EFFECT_CHANGE_CODE 目标卡的卡名当作(某张卡片)同名卡使用
EFFECT_ADD_TYPE 目标卡当作(某种类)使用 用于“这张卡为素材作XX召唤的怪兽得到以下效果”给召唤出的非效果怪兽附加效果怪兽种类,或将不特定魔法陷阱卡特殊召唤后附加怪兽种类
EFFECT_REMOVE_TYPE 目标卡不当作(某种类)使用 用于类似“这张卡只要在场上表侧表示存在,当作通常怪兽使用”的效果
EFFECT_CHANGE_TYPE 目标卡当作(某种类)使用(并马上移动) 用于类似“当作永续魔法卡使用在自己的魔法与陷阱区域表侧表示放置”的效果
EFFECT_ADD_RACE 目标卡也当作(某种族)使用
EFFECT_REMOVE_RACE 目标卡不当作(某种族)使用
EFFECT_CHANGE_RACE 目标卡当作(某种族)使用
EFFECT_ADD_ATTRIBUTE 目标卡也当作(某属性)使用
EFFECT_REMOVE_ATTRIBUTE 目标卡不当作(某属性)使用
EFFECT_CHANGE_ATTRIBUTE 目标卡当作(某属性)使用
EFFECT_UPDATE_LEVEL 目标卡等级上升/下降 正数上升,负数下降
EFFECT_CHANGE_LEVEL 目标卡等级变成(低优先级) 用于如召唤时就决定好等级的场合;被覆盖后不会复原
EFFECT_CHANGE_LEVEL_FINAL 目标卡等级变成(高优先级) 用于类似“直到回合结束变成1”的效果
EFFECT_UPDATE_RANK 目标卡阶级上升/下降
EFFECT_CHANGE_RANK 目标卡阶级变成(低优先级) 用于如召唤时就决定好阶级的场合;被覆盖后不会复原
EFFECT_CHANGE_RANK_FINAL 目标卡等级变成(高优先级) 用于类似“直到回合结束变成1”的效果
EFFECT_UPDATE_LSCALE 目标卡左刻度上升/下降 就规则而言,左右刻度其实应当是合一的。调用这个效果时请别忘记把右刻度也一起设了。
EFFECT_CHANGE_LSCALE 目标卡左刻度变成 就规则而言,左右刻度其实应当是合一的。调用这个效果时请别忘记把右刻度也一起设了。
EFFECT_UPDATE_RSCALE 目标卡改变右刻度 就规则而言,左右刻度其实应当是合一的。调用这个效果时请别忘记把左刻度也一起设了。
EFFECT_CHANGE_RSCALE 目标卡设置右刻度 就规则而言,左右刻度其实应当是合一的。调用这个效果时请别忘记把左刻度也一起设了。
EFFECT_SET_POSITION 目标卡变成(表示形式)
EFFECT_SELF_DESTROY 目标卡在满足(某种条件)的场合目标卡破坏。 用于不入连锁的破坏
EFFECT_SELF_TOGRAVE 目标卡在满足(某种条件)的场合目标卡送去墓地。 用于不入连锁的送墓
EFFECT_DOUBLE_TRIBUTE 目标卡1只怪兽可以作为2只数量的祭品
EFFECT_TRIPLE_TRIBUTE 目标卡1只怪兽可以作为3只数量的祭品
EFFECT_DECREASE_TRIBUTE 目标玩家把(满足条件的)怪兽召唤的场合需要的解放减少(数量)只
EFFECT_DECREASE_TRIBUTE_SET 目标玩家把(满足条件的)怪兽盖放的场合需要的解放减少(数量)只
EFFECT_TRIBUTE_LIMIT 目标卡上级召唤的场合,解放的怪兽必须是(条件)
EFFECT_ADD_EXTRA_TRIBUTE 目标玩家上级召唤的场合,可以作为怪兽的代替而把(指定的卡)解放
EFFECT_EXTRA_RELEASE 目标玩家把怪兽解放的场合,必须作为1只自己怪兽的代替而把(某些卡)解放
EFFECT_EXTRA_RELEASE_SUM 目标玩家把怪兽解放的场合,可以作为1只自己怪兽的代替而把(某些卡)解放
EFFECT_EXTRA_RELEASE_NONSUM 目标玩家为让卡的效果发动而把卡解放的场合,可以作为代替而把(某些卡)解放
EFFECT_PUBLIC 目标卡公开
EFFECT_COUNTER_PERMIT 目标卡标记为可以放置(某类型)指示物的卡
EFFECT_COUNTER_LIMIT 目标卡标记为最多能放置某类型指示物(数量)个的卡
EFFECT_RCOUNTER_REPLACE 目标玩家把(某类型)指示物取除的场合,可以作为代替
EFFECT_LPCOST_CHANGE 目标玩家支付的基本分变成(新数值)
EFFECT_LPCOST_REPLACE 目标玩家支付基本分的场合,可以作为代替(做动作)
EFFECT_SKIP_DP 目标玩家跳过抽卡阶段
EFFECT_SKIP_SP 目标玩家跳过准备阶段
EFFECT_SKIP_M1 目标玩家跳过主要阶段1
EFFECT_SKIP_BP 目标玩家跳过战斗阶段
EFFECT_SKIP_M2 目标玩家跳过主要阶段2
EFFECT_CANNOT_BP 目标玩家不能进入战斗阶段
EFFECT_CANNOT_M2 目标玩家不能进入主要阶段2
EFFECT_CANNOT_EP 目标玩家不能进入结束阶段
EFFECT_SKIP_TURN 目标玩家跳过整个回合
EFFECT_DEFENSE_ATTACK 目标卡可以用表侧守备表示的状态作出攻击
EFFECT_MUST_ATTACK 目标玩家必须选择(某张卡)作为攻击对象 不封锁直接攻击
EFFECT_ONLY_BE_ATTACKED 目标卡控制者来看的对方只能向目标卡攻击 封锁直接攻击
EFFECT_FIRST_ATTACK 目标卡必须继续攻击/目标卡必须首先进行攻击
EFFECT_ATTACK_ALL 目标卡可以向对方怪兽全部各作1次攻击
EFFECT_EXTRA_ATTACK 目标卡在同1次的战斗阶段中可以多作(数量)次攻击 注意是增加的数量而不是最终设置的数量
EFFECT_NO_BATTLE_DAMAGE 目标卡的战斗发生的双方的战斗伤害变成0
EFFECT_AVOID_BATTLE_DAMAGE 目标卡的战斗发生的对自己的战斗伤害变成0
EFFECT_REFLECT_BATTLE_DAMAGE 目标卡的战斗发生的战斗伤害由对方代受
EFFECT_BOTH_BATTLE_DAMAGE 目标卡的战斗发生的战斗伤害由双方玩家承受
EFFECT_ALSO_BATTLE_DAMAGE 目标卡的战斗发生的对自己的战斗伤害让对方也承受
EFFECT_PIERCE 目标卡向守备表示怪兽攻击的场合,给与攻击力超过那个守备力的数值的战斗伤害
EFFECT_BATTLE_DAMAGE_TO_EFFECT 目标卡给与对方玩家的战斗伤害当作效果伤害使用
EFFECT_CHANGE_BATTLE_DAMAGE 目标卡的战斗发生的对自己的战斗伤害变成(新数值)
#EFFECT_TOSS_COIN_REPLACE 重新抛硬币 TODO:没卡在用,思考下怎么介绍
#EFFECT_TOSS_DICE_REPLACE 重新掷骰子
EFFECT_FUSION_MATERIAL 目标卡的正规融合素材条件 多数场合还是推荐使用aux中的函数而不是自己写
EFFECT_CHAIN_MATERIAL 目标玩家融合召唤的场合,可以把融合怪兽卡决定的融合素材怪兽从自己的手卡·卡组·场上·墓地选出从游戏中除外,用这些作为融合素材
EFFECT_SYNCHRO_MATERIAL 目标卡的正规同调素材条件
EFFECT_XYZ_MATERIAL 目标卡的正规XYZ素材条件
EFFECT_FUSION_SUBSTITUTE 目标卡可以作为融合怪兽卡有卡名记述的1只融合素材怪兽的代替
EFFECT_CANNOT_BE_FUSION_MATERIAL 目标卡不能作为融合素材
EFFECT_CANNOT_BE_SYNCHRO_MATERIAL 目标卡不能作为同调素材
EFFECT_SYNCHRO_MATERIAL_CUSTOM 目标卡为素材作同调召唤的场合,(本来不符合规则的特定)怪兽也能作为同调素材
EFFECT_CANNOT_BE_XYZ_MATERIAL 目标卡不能作为XYZ素材
EFFECT_CANNOT_BE_LINK_MATERIAL 目标卡不能作为连接素材
EFFECT_SYNCHRO_LEVEL 目标卡作为同调素材的场合,可以当作(其他等级)怪兽使用
EFFECT_RITUAL_LEVEL 目标卡作为仪式素材的场合,可以作为(其他等级)的解放使用
EFFECT_XYZ_LEVEL 目标卡作为XYZ素材的场合,可以作为(其他等级)怪兽使用
EFFECT_EXTRA_RITUAL_MATERIAL 目标卡-仪式召唤进行的场合,可以作为那次仪式召唤需要的等级数值的1只怪兽,(做动作)
EFFECT_NONTUNER 目标卡可以当作调整以外的怪兽使用
EFFECT_OVERLAY_REMOVE_REPLACE 目标玩家可以作为取除的XYZ素材的代替(做动作)
EFFECT_SCRAP_CHIMERA 目标卡作为同调素材的场合,其他的同调素材必须全部是(条件)
EFFECT_TUNE_MAGICIAN_X 目标卡作为XYZ素材的场合,其他的XYZ素材必须全部是(条件)
EFFECT_TUNE_MAGICIAN_F 目标卡作为融合素材的场合,其他的融合素材必须全部是(条件)
EFFECT_MATERIAL_CHECK 目标卡上场时进行一次素材检查 用来辅助“以(条件)为素材/作解放对这张卡的(召唤方式)成功时”
EFFECT_DISABLE_FIELD 目标玩家的怪兽卡区域最多(数量)处变成不能使用
EFFECT_USE_EXTRA_MZONE 目标卡只要在场上表侧表示存在,自己的怪兽卡区域(数量)处变成不能使用 实质上其实是“这张卡需要占据多个格子”
EFFECT_USE_EXTRA_SZONE 目标卡只要在场上表侧表示存在,自己的魔法卡区域(数量)处变成不能使用 实质上其实是“这张卡需要占据多个格子”
EFFECT_MAX_MZONE 目标玩家场上能出的怪兽变成最多到3只
EFFECT_MAX_SZONE 目标玩家场上能出的魔法·陷阱卡变成最多到3张
EFFECT_MUST_USE_MZONE 目标玩家必须使用怪兽区的某些格子 一般反向用于“自己不能在作为这张卡所连接区的额外怪兽区域让怪兽出现”
EFFECT_HAND_LIMIT 目标玩家手牌数量限制改变
EFFECT_DRAW_COUNT 目标玩家抽卡阶段时的通常抽卡可以抽(数量)张卡
EFFECT_SPIRIT_DONOT_RETURN 目标玩家场上存在的灵魂怪兽在结束阶段时回到手卡效果不发动
EFFECT_SPIRIT_MAYNOT_RETURN 目标玩家场上存在的灵魂怪兽在结束阶段时回到手卡效果可以不发动
EFFECT_CHANGE_ENVIRONMENT 目标玩家场上变成(场地卡)
EFFECT_NECRO_VALLEY 目标玩家受到「王家长眠之谷」影响
EFFECT_FORBIDDEN 目标卡受到「禁止令」影响
EFFECT_NECRO_VALLEY_IM 目标卡这个效果不会被「王家长眠之谷」的效果无效化
EFFECT_REVERSE_DECK 目标玩家把卡组翻转进行决斗
EFFECT_REMOVE_BRAINWASHING 目标玩家场上存在的全部怪兽的控制权回到持有者手中
EFFECT_BP_TWICE 目标玩家的战斗阶段可以进行2次
EFFECT_UNIQUE_CHECK 目标卡在自己场上只能有1只表侧表示存在 请直接使用Card.SetUniqueOnField()
EFFECT_MATCH_KILL 目标卡的直接攻击让对方基本分变成0的场合,目标卡的控制者比赛胜利
EFFECT_SYNCHRO_CHECK 目标卡作为同调素材的场合,其他的同调素材怪兽当作(其他条件)使用
EFFECT_QP_ACT_IN_NTPHAND 目标玩家在对方回合可以把1张速攻魔法卡从手卡发动
EFFECT_MUST_BE_SMATERIAL 目标卡的控制者不能作以目标卡为同调素材的同调召唤以外的特殊召唤
EFFECT_MUST_BE_FMATERIAL 目标卡的控制者不能作以目标卡为融合素材的融合召唤以外的特殊召唤
EFFECT_MUST_BE_XMATERIAL 目标卡的控制者不能作以目标卡为XYZ素材的XYZ召唤以外的特殊召唤
EFFECT_MUST_BE_LMATERIAL 目标卡的控制者不能作以目标卡为连接素材的连接召唤以外的特殊召唤
EFFECT_SPSUMMON_COUNT_LIMIT 目标卡-自己对目标卡1回合只能有(数值)次特殊召唤
EFFECT_LEFT_SPSUMMON_COUNT 目标玩家1回合只能有合计最多(数值)次把怪兽特殊召唤
EFFECT_ADD_SETCODE 目标卡也当作(字段)卡使用
EFFECT_NO_EFFECT_DAMAGE 目标玩家-效果让目标玩家受到的效果伤害变成0
#EFFECT_UNSUMMONABLE_CARD N/A
#EFFECT_DISABLE_CHAIN_FIELD N/A
EFFECT_DISCARD_COST_CHANGE 目标玩家要(因某种原因)而丢弃的手卡变成不需要
EFFECT_HAND_SYNCHRO 目标卡作为同调素材的场合,其他的同调素材怪兽必须是手卡1只怪兽
EFFECT_ADD_FUSION_CODE 目标卡作为融合素材的场合,可以作为(卡名)来成为融合素材
EFFECT_ADD_FUSION_SETCODE 目标卡作为融合素材的场合,可以作为(字段)来成为融合素材
#EFFECT_RISE_TO_FULL_HEIGHT N/A
EFFECT_ONLY_ATTACK_MONSTER 目标玩家的对方只能向(某只怪兽)攻击
EFFECT_MUST_ATTACK_MONSTER 目标卡控制者对方场上的怪兽可以攻击的场合,必须向目标卡作出攻击
EFFECT_PATRICIAN_OF_DARKNESS 目标卡在场上表侧表示存在,对方怪兽的攻击对象由目标卡的控制者选择
EFFECT_EXTRA_ATTACK_MONSTER 目标卡可以再向对方怪兽作出(数值)数量的攻击 注意是多攻击几次而不是总数
EFFECT_UNION_STATUS 目标卡处于同盟状态 请直接使用aux.SetUnionState(c)
EFFECT_OLDUNION_STATUS 目标卡有旧同盟卡共通效果 请直接使用aux.SetUnionState(c);旧效果:1只怪兽可以装备的同盟最多1张。装备怪兽被战斗破坏的场合,作为代替把这张卡破坏。
EFFECT_ADD_FUSION_ATTRIBUTE 目标卡作为融合素材的场合,可以作为(属性)来成为融合素材
EFFECT_REMOVE_FUSION_ATTRIBUTE 目标卡作为融合素材的场合,不能作为(属性)来成为融合素材
EFFECT_CHANGE_FUSION_ATTRIBUTE 目标卡作为融合素材的场合,必须作为(属性)来成为融合素材
EFFECT_EXTRA_FUSION_MATERIAL 目标卡可以作为(特定某只)融合怪兽的融合素材使用
EFFECT_TUNER_MATERIAL_LIMIT 目标卡作为同调素材的场合,其他的同调素材必须全部是(条件)
EFFECT_ADD_LINK_CODE 目标卡作为连接素材的场合,可以作为(卡名)来成为连接素材
EFFECT_ADD_LINK_SETCODE 目标卡作为连接素材的场合,可以作为(字段)来成为连接素材
EFFECT_ADD_LINK_ATTRIBUTE 目标卡作为连接素材的场合,可以作为(属性)来成为连接素材
EFFECT_ADD_LINK_RACE 目标卡作为连接素材的场合,可以作为(种族)来成为连接素材
EFFECT_EXTRA_LINK_MATERIAL 目标卡作为连接素材的场合,其他的连接素材必须全部是(条件)
EFFECT_QP_ACT_IN_SET_TURN 目标玩家的速攻魔法可以在盖放的回合发动
EFFECT_EXTRA_PENDULUM_SUMMON 目标玩家在通常的灵摆召唤外加上只有1次,可以把怪兽灵摆召唤
EFFECT_MATERIAL_LIMIT 目标卡的召唤素材必须全部是(条件)
EFFECT_SET_BATTLE_ATTACK 目标卡进行战斗的伤害计算用设置的攻击力进行
EFFECT_SET_BATTLE_DEFENSE 目标卡进行战斗的伤害计算用设置的守备力进行
!EVENT_CODES
#以下全写成时,自己加EFFECT_FLAG_DELAY吧
EVENT_FLIP 卡反转时
EVENT_FREE_CHAIN 任何时点
EVENT_REMOVE 卡从游戏中除外时
EVENT_TO_HAND 卡加入手卡时 包括抽到时
EVENT_TO_DECK 卡回到卡组时
EVENT_TO_GRAVE 卡送去墓地时 从除外区回到墓地不算
EVENT_CHANGE_POS 卡的表示形式变更时
EVENT_RELEASE 卡被解放时
EVENT_DISCARD 玩家丢弃手卡时
EVENT_LEAVE_FIELD 卡离开场上时
EVENT_LEAVE_FIELD_P 卡从场上离开之际
EVENT_CHAIN_SOLVING 卡的效果处理开始时 多用于效果无效化
#EVENT_CHAIN_ACTIVATING 连锁处理准备中
EVENT_CHAIN_SOLVED 卡的效果处理结束时 多用于“每次(玩家)把魔法卡发动”
EVENT_CHAIN_NEGATED 效果发动无效时
EVENT_CHAIN_DISABLED 效果无效时
EVENT_CHAIN_END 连锁结束时 用于“连锁的场合”“自己的反击陷阱发动成功的场合”等
EVENT_CHAINING 效果发动时 用于各类反击陷阱
EVENT_BECOME_TARGET 卡成为效果的对象时
EVENT_DESTROY 卡被破坏之际 TODO:区别?
EVENT_DESTROYED 卡被破坏时
EVENT_MOVE 卡片移动时
EVENT_ADJUST 场面和阶段有变化时 实质为adjust_all()调整后,御前试合。在此间使用Duel.Readjust()有可能死循环,请谨慎
EVENT_SUMMON_SUCCESS 通常召唤成功时
EVENT_FLIP_SUMMON_SUCCESS 反转召唤成功时
EVENT_SPSUMMON_SUCCESS 特殊召唤成功时
EVENT_SUMMON 召唤之际(怪兽还没上场、神宣等时点)
EVENT_FLIP_SUMMON 反转召唤之际
EVENT_SPSUMMON 特殊召唤之际
EVENT_MSET 怪兽盖放时
EVENT_SSET 魔法·陷阱卡被盖放时
EVENT_BE_MATERIAL 作为(召唤方法)素材时
EVENT_BE_PRE_MATERIAL 将要作为(召唤方法)素材时
EVENT_DRAW 抽卡时
EVENT_DAMAGE 受到伤害时
EVENT_RECOVER 回复生命值时
EVENT_PREDRAW 抽卡阶段通常抽卡前
EVENT_SUMMON_NEGATED 召唤被无效时
EVENT_FLIP_SUMMON_NEGATED 反转召唤被无效时
EVENT_SPSUMMON_NEGATED 特殊召唤被无效时
EVENT_CONTROL_CHANGED 控制权变更时
EVENT_EQUIP 装备卡被装备时
EVENT_ATTACK_ANNOUNCE 攻击宣言时
EVENT_BE_BATTLE_TARGET 被选为攻击对象时
EVENT_BATTLE_START 伤害步骤开始时 反转前
EVENT_BATTLE_CONFIRM 伤害计算前 反转后
EVENT_PRE_DAMAGE_CALCULATE 伤害计算时
#EVENT_DAMAGE_CALCULATING N/A
EVENT_PRE_BATTLE_DAMAGE 即将产生战斗伤害 只能使用EFFECT_TYPE_CONTINUOUS,用于变化战斗伤害
#EVENT_BATTLE_END N/A
EVENT_BATTLED 伤害计算后
EVENT_BATTLE_DESTROYING 战斗破坏对方怪兽送去墓地时
EVENT_BATTLE_DESTROYED 被战斗破坏送去墓地时
EVENT_DAMAGE_STEP_END 伤害步骤结束时 电 光 皇
EVENT_ATTACK_DISABLED 攻击无效时 翻倍机会
EVENT_BATTLE_DAMAGE 造成战斗伤害时
EVENT_TOSS_DICE 掷骰子之际
EVENT_TOSS_COIN 抛硬币之际
EVENT_TOSS_COIN_NEGATE 掷硬币的效果适用之际
EVENT_TOSS_DICE_NEGATE 掷骰子的效果适用之际
EVENT_LEVEL_UP 等级上升时
EVENT_PAY_LPCOST 支付生命值时
EVENT_DETACH_MATERIAL 去除XYZ素材时
EVENT_RETURN_TO_GRAVE 回到墓地时
EVENT_TURN_END 回合结束时
EVENT_PHASE 阶段结束时
EVENT_PHASE_START 阶段开始时
EVENT_ADD_COUNTER 增加指示物时
EVENT_REMOVE_COUNTER 去除指示物时 Card.RemoveCounter()必须手动触发此事件
EVENT_CUSTOM 自訂事件
!CATEGORY
CATEGORY_DESTROY 破坏效果
CATEGORY_RELEASE 解放效果
CATEGORY_REMOVE 除外效果
CATEGORY_TOHAND 回手牌效果
CATEGORY_TODECK 回卡组效果
CATEGORY_TOGRAVE 送去墓地效果
CATEGORY_DECKDES 從卡组送去墓地效果
CATEGORY_HANDES 丢弃手牌效果
CATEGORY_SUMMON 含召唤的效果
CATEGORY_SPECIAL_SUMMON 含特殊召唤的效果
CATEGORY_TOKEN 含衍生物效果
CATEGORY_GRAVE_ACTION 包含涉及墓地的部分的效果
CATEGORY_POSITION 改变表示形式效果
CATEGORY_CONTROL 改变控制权效果
CATEGORY_DISABLE 使效果无效效果
CATEGORY_DISABLE_SUMMON 无效召唤效果
CATEGORY_DRAW 抽卡效果
CATEGORY_SEARCH 检索卡组效果
CATEGORY_EQUIP 装备效果
CATEGORY_DAMAGE 伤害效果
CATEGORY_RECOVER 回复效果
CATEGORY_ATKCHANGE 改变攻击效果
CATEGORY_DEFCHANGE 改变防御效果
CATEGORY_COUNTER 指示物效果
CATEGORY_COIN 硬币效果
CATEGORY_DICE 骰子效果
CATEGORY_LEAVE_GRAVE 涉及墓地的效果
CATEGORY_LVCHANGE 改变等级效果
CATEGORY_NEGATE 使发动无效效果
CATEGORY_ANNOUNCE 發動時宣言卡名的效果
CATEGORY_FUSION_SUMMON 融合召唤效果
CATEGORY_TOEXTRA 回额外卡组效果
!TIMING
TIMING_DRAW_PHASE 抽卡阶段时点
TIMING_STANDBY_PHASE 准备阶段时点
TIMING_MAIN_END 主要阶段结束时点
TIMING_BATTLE_START 战斗阶段开始时点
TIMING_BATTLE_END 战斗阶段结束时点
TIMING_END_PHASE 结束阶段时点
TIMING_SUMMON 召唤时点
TIMING_SPSUMMON 特殊召唤时点
TIMING_FLIPSUMMON 翻转召唤时点
TIMING_MSET 放置怪兽时点
TIMING_SSET 放置魔陷时点
TIMING_POS_CHANGE 表示形式变更时点
TIMING_ATTACK 攻击宣言时点
TIMING_DAMAGE_STEP 伤害步骤时点
TIMING_DAMAGE_CAL 伤害计算时点
TIMING_CHAIN_END 连锁结束时点
TIMING_DRAW 抽卡时点(不是抽卡阶段)
TIMING_DAMAGE 造成伤害时点
TIMING_RECOVER 回复时点
TIMING_DESTROY 破坏时点
TIMING_REMOVE 除外时点
TIMING_TOHAND 加入手牌时点(检索、回收等)
TIMING_TODECK 回卡组时点
TIMING_TOGRAVE 进墓地时点
TIMING_BATTLE_PHASE 战斗阶段时点
TIMING_EQUIP 装备时点
TIMING_BATTLE_STEP_END 戰鬥步驟結束時
TIMING_BATTLED 伤害计算后时点
!LOCATIONS
LOCATION_DECK 卡组
LOCATION_HAND 手牌
LOCATION_MZONE 怪兽区
LOCATION_SZONE 魔陷区(0~4)+场地区(5)
LOCATION_GRAVE 墓地
LOCATION_REMOVED 除外区
LOCATION_EXTRA 额外
LOCATION_OVERLAY XYZ素材
LOCATION_ONFIELD 场上(LOCATION_MZONE+LOCATION_SZONE)
LOCATION_FZONE 场地区
LOCATION_PZONE 灵摆区
!TYPES
TYPE_MONSTER 怪兽卡
TYPE_SPELL 魔法卡
TYPE_TRAP 陷阱卡
TYPE_NORMAL 通常怪兽
TYPE_EFFECT 效果
TYPE_FUSION 融合
TYPE_RITUAL 仪式
TYPE_TRAPMONSTER 陷阱怪兽
TYPE_SPIRIT 灵魂
TYPE_UNION 同盟
TYPE_DUAL 二重
TYPE_TUNER 调整
TYPE_SYNCHRO 同调
TYPE_TOKEN 衍生物
TYPE_QUICKPLAY 速攻
TYPE_CONTINUOUS 永续
TYPE_EQUIP 装备
TYPE_FIELD 场地
TYPE_COUNTER 反击
TYPE_FLIP 翻转
TYPE_TOON 卡通
TYPE_XYZ XYZ
TYPE_PENDULUM 灵摆
TYPE_SPSUMMON 特殊召唤
TYPE_LINK 连接
!ATTRIBUTES
ATTRIBUTE_EARTH 地
ATTRIBUTE_WATER 水
ATTRIBUTE_FIRE 炎
ATTRIBUTE_WIND 风
ATTRIBUTE_LIGHT 光
ATTRIBUTE_DARK 暗
ATTRIBUTE_DIVINE 神
!RACES
RACE_ALL 全种族
RACE_WARRIOR 战士
RACE_SPELLCASTER 魔法师
RACE_FAIRY 天使
RACE_FIEND 恶魔
RACE_ZOMBIE 不死
RACE_MACHINE 机械
RACE_AQUA 水
RACE_PYRO 炎
RACE_ROCK 岩石
RACE_WINDBEAST 鸟兽
RACE_PLANT 植物
RACE_INSECT 昆虫
RACE_THUNDER 雷
RACE_DRAGON 龙
RACE_BEAST 兽
RACE_BEASTWARRIOR 兽战士
RACE_DINOSAUR 恐龙
RACE_FISH 鱼
RACE_SEASERPENT 海龙
RACE_REPTILE 爬虫类
RACE_PSYCHO 念动力
RACE_DIVINE 幻神兽
RACE_CREATORGOD 创造神
RACE_WYRM 幻龙
RACE_CYBERSE 电子界
\ No newline at end of file
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