Commit 47183ee5 authored by JoyJ's avatar JoyJ

use Avalon Editor

parent fce39f6b
/*
* 由SharpDevelop创建。
* 用户: Acer
* 日期: 2014-10-22
* 时间: 19:16
*
*/
using ICSharpCode.AvalonEdit.CodeCompletion;
using ICSharpCode.AvalonEdit.Document;
using ICSharpCode.AvalonEdit.Editing;
using System;
using System.Collections.Generic;
using System.Windows.Forms;
using System.Windows.Forms.Integration;
using System.Windows.Input;
namespace DataEditorX
{
partial class CodeEditForm_Avalon
{
/// <summary>
/// Designer variable used to keep track of non-visual components.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Disposes resources used by the form.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing)
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose(disposing);
}
/// <summary>
/// This method is required for Windows Forms designer support.
/// Do not change the method contents inside the source code editor. The Forms designer might
/// not be able to load this method if it was changed manually.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.mainMenu = new System.Windows.Forms.MenuStrip();
this.menuitem_file = new System.Windows.Forms.ToolStripMenuItem();
this.menuitem_open = new System.Windows.Forms.ToolStripMenuItem();
this.menuitem_save = new System.Windows.Forms.ToolStripMenuItem();
this.menuitem_saveas = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
this.menuitem_quit = new System.Windows.Forms.ToolStripMenuItem();
this.menuitem_setting = new System.Windows.Forms.ToolStripMenuItem();
this.menuitem_showinput = new System.Windows.Forms.ToolStripMenuItem();
this.menuitem_find = new System.Windows.Forms.ToolStripMenuItem();
this.menuitem_replace = new System.Windows.Forms.ToolStripMenuItem();
this.menuitem_help = new System.Windows.Forms.ToolStripMenuItem();
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.menuitem_effectcreator = new System.Windows.Forms.ToolStripMenuItem();
this.tb_input = new System.Windows.Forms.TextBox();
this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
this.documentMap1 = new FastColoredTextBoxNS.DocumentMap();
this.host = new System.Windows.Forms.Integration.ElementHost();
this.editor = new ICSharpCode.AvalonEdit.TextEditor();
this.mainMenu.SuspendLayout();
this.SuspendLayout();
//
// mainMenu
//
this.mainMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.menuitem_file,
this.menuitem_setting,
this.menuitem_tools,
this.menuitem_help});
this.mainMenu.Location = new System.Drawing.Point(0, 0);
this.mainMenu.Name = "mainMenu";
this.mainMenu.Size = new System.Drawing.Size(705, 24);
this.mainMenu.TabIndex = 0;
this.mainMenu.Text = "mainMenu";
//
// menuitem_file
//
this.menuitem_file.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.menuitem_open,
this.menuitem_save,
this.menuitem_saveas,
this.toolStripSeparator1,
this.menuitem_quit});
this.menuitem_file.Name = "menuitem_file";
this.menuitem_file.Size = new System.Drawing.Size(51, 20);
this.menuitem_file.Text = "File(&F)";
//
// menuitem_open
//
this.menuitem_open.Name = "menuitem_open";
this.menuitem_open.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.O)));
this.menuitem_open.Size = new System.Drawing.Size(145, 22);
this.menuitem_open.Text = "Open";
this.menuitem_open.Click += new System.EventHandler(this.Menuitem_openClick);
//
// menuitem_save
//
this.menuitem_save.Name = "menuitem_save";
this.menuitem_save.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.S)));
this.menuitem_save.Size = new System.Drawing.Size(145, 22);
this.menuitem_save.Text = "Save";
this.menuitem_save.Click += new System.EventHandler(this.SaveToolStripMenuItemClick);
//
// menuitem_saveas
//
this.menuitem_saveas.Name = "menuitem_saveas";
this.menuitem_saveas.Size = new System.Drawing.Size(145, 22);
this.menuitem_saveas.Text = "Save As";
this.menuitem_saveas.Click += new System.EventHandler(this.SaveAsToolStripMenuItemClick);
//
// toolStripSeparator1
//
this.toolStripSeparator1.Name = "toolStripSeparator1";
this.toolStripSeparator1.Size = new System.Drawing.Size(142, 6);
//
// menuitem_quit
//
this.menuitem_quit.Name = "menuitem_quit";
this.menuitem_quit.Size = new System.Drawing.Size(145, 22);
this.menuitem_quit.Text = "Quit";
this.menuitem_quit.Click += new System.EventHandler(this.QuitToolStripMenuItemClick);
//
// menuitem_setting
//
this.menuitem_setting.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.menuitem_showinput,
this.menuitem_find,
this.menuitem_replace});
this.menuitem_setting.Name = "menuitem_setting";
this.menuitem_setting.Size = new System.Drawing.Size(75, 20);
this.menuitem_setting.Text = "Settings(&S)";
//
// menuitem_showinput
//
this.menuitem_showinput.Checked = true;
this.menuitem_showinput.CheckState = System.Windows.Forms.CheckState.Checked;
this.menuitem_showinput.Name = "menuitem_showinput";
this.menuitem_showinput.Size = new System.Drawing.Size(184, 22);
this.menuitem_showinput.Text = "Show/Hide InputBox";
this.menuitem_showinput.Click += new System.EventHandler(this.Menuitem_showinputClick);
//
// menuitem_find
//
this.menuitem_find.Name = "menuitem_find";
this.menuitem_find.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.F)));
this.menuitem_find.Size = new System.Drawing.Size(184, 22);
this.menuitem_find.Text = "Find";
this.menuitem_find.Click += new System.EventHandler(this.Menuitem_findClick);
//
// menuitem_replace
//
this.menuitem_replace.Name = "menuitem_replace";
this.menuitem_replace.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.H)));
this.menuitem_replace.Size = new System.Drawing.Size(184, 22);
this.menuitem_replace.Text = "Replace";
this.menuitem_replace.Click += new System.EventHandler(this.Menuitem_replaceClick);
//
// menuitem_help
//
this.menuitem_help.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.menuitem_about});
this.menuitem_help.Name = "menuitem_help";
this.menuitem_help.Size = new System.Drawing.Size(61, 20);
this.menuitem_help.Text = "Help(&H)";
//
// menuitem_about
//
this.menuitem_about.Name = "menuitem_about";
this.menuitem_about.Size = new System.Drawing.Size(180, 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_effectcreator});
this.menuitem_tools.Name = "menuitem_tools";
this.menuitem_tools.Size = new System.Drawing.Size(60, 20);
this.menuitem_tools.Text = "Tools(&T)";
//
// menuitem_testlua
//
this.menuitem_testlua.Name = "menuitem_testlua";
this.menuitem_testlua.ShortcutKeys = System.Windows.Forms.Keys.F5;
this.menuitem_testlua.Size = new System.Drawing.Size(180, 22);
this.menuitem_testlua.Text = "Syntax Check";
this.menuitem_testlua.Click += new System.EventHandler(this.menuitem_testlua_Click);
//
// menuitem_effectcreator
//
this.menuitem_effectcreator.Name = "menuitem_effectcreator";
this.menuitem_effectcreator.ShortcutKeys = System.Windows.Forms.Keys.F3;
this.menuitem_effectcreator.Size = new System.Drawing.Size(180, 22);
this.menuitem_effectcreator.Text = "Effect Creator";
this.menuitem_effectcreator.Visible = false;
this.menuitem_effectcreator.Click += new System.EventHandler(this.effectCreatorToolStripMenuItem_Click);
//
// tb_input
//
this.tb_input.BackColor = System.Drawing.SystemColors.Control;
this.tb_input.Dock = System.Windows.Forms.DockStyle.Bottom;
this.tb_input.Location = new System.Drawing.Point(0, 394);
this.tb_input.Margin = new System.Windows.Forms.Padding(0);
this.tb_input.Name = "tb_input";
this.tb_input.Size = new System.Drawing.Size(514, 21);
this.tb_input.TabIndex = 1;
this.tb_input.KeyDown += new System.Windows.Forms.KeyEventHandler(this.Tb_inputKeyDown);
//
// documentMap1
//
this.documentMap1.BackColor = System.Drawing.Color.DimGray;
this.documentMap1.Dock = System.Windows.Forms.DockStyle.Right;
this.documentMap1.ForeColor = System.Drawing.Color.Maroon;
this.documentMap1.Location = new System.Drawing.Point(514, 24);
this.documentMap1.Name = "documentMap1";
this.documentMap1.Size = new System.Drawing.Size(191, 391);
this.documentMap1.TabIndex = 5;
this.documentMap1.Target = null;
this.documentMap1.Text = "documentMap1";
this.documentMap1.Visible = false;
//
// host
//
this.host.Dock = System.Windows.Forms.DockStyle.Fill;
this.host.Location = new System.Drawing.Point(0, 24);
this.host.Name = "host";
this.host.Size = new System.Drawing.Size(514, 370);
this.host.TabIndex = 0;
this.host.Child = this.editor;
//
// CodeEditForm_Avalon
//
this.AllowDrop = true;
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.ClientSize = new System.Drawing.Size(705, 415);
this.Controls.Add(this.host);
this.Controls.Add(this.tb_input);
this.Controls.Add(this.documentMap1);
this.Controls.Add(this.mainMenu);
this.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.MainMenuStrip = this.mainMenu;
this.Name = "CodeEditForm_Avalon";
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);
this.DragDrop += new System.Windows.Forms.DragEventHandler(this.OnDragDtop);
this.DragEnter += new System.Windows.Forms.DragEventHandler(this.OnDragEnter);
this.Enter += new System.EventHandler(this.CodeEditFormEnter);
this.mainMenu.ResumeLayout(false);
this.mainMenu.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
string sep = "()[]{}., :\t\n";
CompletionWindow completionWindowUse = null;
int lastOffset = 0;
private void editor_TextArea_TextEntered(object sender, TextCompositionEventArgs e)
{
// Open code completion after the user has pressed dot:
completionWindowUse = new CompletionWindow(editor.TextArea);
completionWindowUse.StartOffset = lastOffset;
IList<ICompletionData> data = completionWindowUse.CompletionList.CompletionData;
string find = editor.Document.GetText(lastOffset, completionWindowUse.EndOffset - completionWindowUse.StartOffset);
if (string.IsNullOrEmpty(find))
{
return;
}
foreach (var d in tooltipDic)
{
if (d.Key.ToLower().StartsWith(find.ToLower()))
{
data.Add(new YGOProAutoCompletion(d.Key, d.Value));
}
}
if (data.Count > 0)
{
completionWindowUse.Show();
completionWindowUse.Closed += delegate {
completionWindowUse = null;
};
}
}
CompletionWindow completionWindow = null;
private void editor_TextArea_TextEntering(object sender, TextCompositionEventArgs e)
{
if (!char.IsLetterOrDigit(e.Text[0]))
{
lastOffset = Math.Max(0, editor.CaretOffset + 1);
}
else
{
lastOffset = editor.CaretOffset - 1;
string nowChar = editor.Document.GetCharAt(lastOffset).ToString();
while (!sep.Contains(nowChar) && lastOffset > 0)
{
lastOffset--;
nowChar = editor.Document.GetCharAt(lastOffset).ToString();
}
lastOffset++;
}
if (e.Text.Length > 0 && completionWindowUse != null)
{
completionWindowUse.StartOffset = lastOffset;
// Whenever a non-letter is typed while the completion window is open,
// insert the currently selected element.
completionWindowUse.CompletionList.RequestInsertion(e);
}
}
public class YGOProAutoCompletion : ICompletionData
{
public YGOProAutoCompletion(string text, string description)
{
this.Text = text;
_description = description;
}
public System.Windows.Media.ImageSource Image
{
get { return null; }
}
public string Text { get; private set; }
private string _description;
// Use this property if you want to show a fancy UIElement in the list.
public object Content
{
get { return this.Text; }
}
public object Description
{
get { return _description; }
}
public double Priority
{
get { return 0; }
}
public void Complete(TextArea textArea, ISegment completionSegment,
EventArgs insertionRequestEventArgs)
{
textArea.Document.Replace(completionSegment, this.Text);
}
}
private System.Windows.Forms.ToolStripMenuItem menuitem_replace;
private System.Windows.Forms.ToolStripMenuItem menuitem_find;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
private System.Windows.Forms.ToolStripMenuItem menuitem_showinput;
private System.Windows.Forms.TextBox tb_input;
private FastColoredTextBoxNS.DocumentMap documentMap1;
private System.Windows.Forms.ToolStripMenuItem menuitem_about;
private System.Windows.Forms.ToolStripMenuItem menuitem_help;
private System.Windows.Forms.ToolStripMenuItem menuitem_setting;
private System.Windows.Forms.ToolStripMenuItem menuitem_quit;
private System.Windows.Forms.ToolStripMenuItem menuitem_saveas;
private System.Windows.Forms.ToolStripMenuItem menuitem_save;
private System.Windows.Forms.ToolStripMenuItem menuitem_open;
private System.Windows.Forms.ToolStripMenuItem menuitem_file;
private System.Windows.Forms.MenuStrip mainMenu;
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 menuitem_effectcreator;
private ElementHost host;
ICSharpCode.AvalonEdit.TextEditor editor;
}
}
/*
* 由SharpDevelop创建。
* 用户: Acer
* 日期: 2014-10-22
* 时间: 19:16
*
*/
using DataEditorX.Config;
using DataEditorX.Controls;
using DataEditorX.Core;
using DataEditorX.Language;
using FastColoredTextBoxNS;
using Neo.IronLua;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Text;
using System.Web.Script.Serialization;
using System.Windows.Forms;
using WeifenLuo.WinFormsUI.Docking;
using ICSharpCode.AvalonEdit.Highlighting.Xshd;
using System.Xml;
using ICSharpCode.AvalonEdit.Highlighting;
using ICSharpCode.AvalonEdit.Search;
using System.Windows.Threading;
using System.Text.RegularExpressions;
namespace DataEditorX
{
/// <summary>
/// Description of CodeEditForm.
/// </summary>
public partial class CodeEditForm_Avalon : DockContent, IEditForm
{
#region Style
SortedDictionary<long, string> cardlist;
#endregion
#region init 函数提示菜单
//自动完成
AutocompleteMenu popupMenu;
string nowFile;
string title;
string oldtext;
public SortedList<string, string> tooltipDic;
AutocompleteItem[] items;
bool tabisspaces = false;
public CodeEditForm_Avalon()
{
InitForm();
}
void InitForm()
{
cardlist = new SortedDictionary<long, string>();
tooltipDic = new SortedList<string, string>();
InitializeComponent();
editor.ShowLineNumbers = true;
editor.TextArea.TextEntered += editor_TextArea_TextEntered;
editor.TextArea.TextEntering += editor_TextArea_TextEntering;
editor.TextArea.KeyDown += TextArea_KeyDown;
editor.TextChanged += Editor_TextChanged;
editor.FontFamily = new System.Windows.Media.FontFamily(MyConfig.TAG_FONT_NAME);
editor.FontSize = MyConfig.ReadFloat(MyConfig.TAG_FONT_SIZE, (float)editor.FontSize);
editor.WordWrap = MyConfig.ReadBoolean(MyConfig.TAG_WORDWRAP);
editor.Background = System.Windows.Media.Brushes.Black;
editor.Foreground = System.Windows.Media.Brushes.GhostWhite;
this.RefreshHighlighting();
}
int lastCaret = 0;
private void Editor_TextChanged(object sender, EventArgs e)
{
if (completionWindowUse != null && completionWindowUse.CompletionList.SelectedItem != null && editor.CaretOffset != lastCaret)
{
completionWindowUse.Close();
}
lastCaret = editor.CaretOffset;
}
private void TextArea_KeyDown(object sender, System.Windows.Input.KeyEventArgs e)
{
if (!e.Key.Equals(System.Windows.Input.Key.LeftCtrl))
{
return;
}
if (completionWindowUse != null && completionWindowUse.CompletionList.SelectedItem == null && completionWindowUse.CompletionList.CompletionData.Count > 0)
{
completionWindowUse.CompletionList.SelectItem(completionWindowUse.CompletionList.CompletionData[0].Text);
}
}
private int FindMainRuleSetIndex(XshdSyntaxDefinition definition)
{
if (definition == null)
{
return -1;
}
for (int i = 0; i < definition.Elements.Count; i++)
{
if (definition.Elements[i] is XshdRuleSet && definition.Elements[i] != null && (definition.Elements[i] as XshdRuleSet).Name == null)
{
return i;
}
}
return -1;
}
private int FindXshdColorByName(XshdSyntaxDefinition definition, string name)
{
if (definition == null)
{
return -1;
}
for (int i = 0; i < definition.Elements.Count; i++)
{
if (definition.Elements[i] is XshdRuleSet && definition.Elements[i] != null && (definition.Elements[i] as XshdRuleSet).Name == null)
{
return i;
}
}
return -1;
}
private void RefreshHighlighting()
{
using (XmlReader reader = new XmlTextReader("data\\avalon.xshd"))
{
var gLua = HighlightingLoader.LoadXshd(reader);
if (nowFile != null && this.Text.Length > 4)
{
string cName = this.Text.Substring(0, this.Text.Length - 4);
var cRule = new XshdKeywords();
cRule.Words.Add(cName);
XshdColor color = new XshdColor();
color.Name = "cFunction";
color.Foreground = new SimpleHighlightingBrush(System.Windows.Media.Color.FromArgb(0xFF, 0x92, 0x1A, 0xFF));
color.FontWeight = System.Windows.FontWeights.Bold;
cRule.ColorReference = new XshdReference<XshdColor>(color);
(gLua.Elements[this.FindMainRuleSetIndex(gLua)] as XshdRuleSet).Elements.Insert(0, cRule);
var cRule2 = new XshdRule();
cRule2.Regex = @"\b(" + cName + @"\.[A-Za-z0-9_]+)";
XshdColor color2 = new XshdColor();
color2.Name = "cFunction2";
color2.Foreground = new SimpleHighlightingBrush(System.Windows.Media.Color.FromArgb(0xFF, 0x92, 0x1A, 0xFF));
color2.FontWeight = System.Windows.FontWeights.Bold;
cRule2.ColorReference = new XshdReference<XshdColor>(color2);
(gLua.Elements[this.FindMainRuleSetIndex(gLua)] as XshdRuleSet).Elements.Insert(0, cRule2);
}
editor.SyntaxHighlighting = HighlightingLoader.Load(gLua, HighlightingManager.Instance);
}
}
private void Fctb_TextChanged(object sender, TextChangedEventArgs e)
{
PopupMenu_VisibleChanged(null, null);
}
private void ToolTip_Popup(object sender, PopupEventArgs e)
{
e.Cancel = true;
}
private void PopupMenu_VisibleChanged(object sender, EventArgs e)
{
if (!popupMenu.Visible)
{
AdjustPopupMenuSize();
return;
}
if (popupMenu.Items.FocussedItem == null)
{
if (popupMenu.Items.Count == 0)
{
return;
}
popupMenu.Items.FocussedItemIndex = 0;
}
//this.fctb.ShowTooltipWithLabel(this.popupMenu.Items.FocussedItem.ToolTipTitle,
// this.popupMenu.Items.FocussedItem.ToolTipText);
AdjustPopupMenuSize();
}
private void AdjustPopupMenuSize()
{
if (!popupMenu.Visible || popupMenu.Items.FocussedItem == null)
{
popupMenu.Size = new Size(300, 0);
popupMenu.MinimumSize = new Size(300, 0);
return;
}
Size s = TextRenderer.MeasureText(popupMenu.Items.FocussedItem.ToolTipTitle,
popupMenu.Items.Font, new Size(0, 0), TextFormatFlags.NoPadding);
s = new Size(s.Width + 50, popupMenu.Size.Height);
if (popupMenu.Size.Width < s.Width)
{
popupMenu.Size = s;
popupMenu.MinimumSize = s;
}
}
internal void InitTooltip(CodeConfig codecfg)
{
this.tooltipDic = codecfg.TooltipDic;
}
private void Items_FocussedItemIndexChanged(object sender, EventArgs e)
{
if (popupMenu.Items.FocussedItem == null)
{
return;
}
AdjustPopupMenuSize();
//this.fctb.ShowTooltipWithLabel(this.popupMenu.Items.FocussedItem.ToolTipTitle,
// this.popupMenu.Items.FocussedItem.ToolTipText);
}
void popupMenu_Closed(object sender, ToolStripDropDownClosedEventArgs e)
{
popupMenu.Items.SetAutocompleteItems(items);
}
#endregion
#region IEditForm接口
public void SetActived()
{
Activate();
}
public bool CanOpen(string file)
{
return YGOUtil.IsScript(file);
}
public string GetOpenFile()
{
return nowFile;
}
public bool Create(string file)
{
return Open(file);
}
public bool Save()
{
return savefile(string.IsNullOrEmpty(nowFile));
}
public bool Open(string file)
{
if (!string.IsNullOrEmpty(file))
{
if (!File.Exists(file))
{
FileStream fs = new FileStream(file, FileMode.Create);
fs.Close();
}
nowFile = file;
FileInfo fi = new FileInfo(file);
if (fi.Name.ToUpper().EndsWith(".LUA"))
{
//(this.fctb.SyntaxHighlighter as MySyntaxHighlighter).cCode
// = fi.Name.Substring(0, fi.Name.Length - 4);
}
string cdb = MyPath.Combine(
Path.GetDirectoryName(file), "../cards.cdb");
//SetCardDB(cdb);//后台加载卡片数据
editor.Text = File.ReadAllText(file, new UTF8Encoding(false));
oldtext = editor.Text;
this.SetTitle();
this.RefreshHighlighting();
return true;
}
return false;
}
#endregion
#region 设置标题
void SetTitle()
{
string str;
if (string.IsNullOrEmpty(nowFile))
{
str = title;
}
else
{
str = new FileInfo(nowFile).Name;
}
if (MdiParent != null)//如果父容器不为空
{
if (string.IsNullOrEmpty(nowFile))
{
Text = title;
TabText = title;
}
else
{
Text = Path.GetFileName(nowFile);
}
MdiParent.Text = str;
}
else
{
Text = str;
TabText = str;
}
}
void CodeEditFormEnter(object sender, EventArgs e)
{
SetTitle();
}
#endregion
#region 悬停的函数说明
//查找函数说明
string FindTooltip(string word)
{
string desc = "";
foreach (string v in tooltipDic.Keys)
{
int t = v.IndexOf(".");
string k = v;
if (t > 0)
{
k = v.Substring(t + 1);
}
if (word == k)
{
desc = tooltipDic[v];
}
}
return desc;
}
//悬停的函数说明
void FctbToolTipNeeded(object sender, ToolTipNeededEventArgs e)
{
if (!string.IsNullOrEmpty(e.HoveredWord))
{
long tl = 0;
string name = e.HoveredWord;
string desc = "";
if (!name.StartsWith("0x") && name.Length <= 9)
{
name = name.Replace("c", "");
long.TryParse(name, out tl);
}
if (tl > 0)
{
//获取卡片信息
if (cardlist.ContainsKey(tl))
{
desc = cardlist[tl];
}
}
else
{
desc = FindTooltip(e.HoveredWord);
}
if (!string.IsNullOrEmpty(desc))
{
e.ToolTipTitle = e.HoveredWord;
e.ToolTipText = desc;
}
}
}
#endregion
#region 保存文件
bool savefile(bool saveas)
{
string alltext = this.editor.Text;
if (!tabisspaces)
{
alltext = alltext.Replace(" ", "\t");
}
if (saveas)
{
using (SaveFileDialog sfdlg = new SaveFileDialog())
{
try
{
sfdlg.Filter = LanguageHelper.GetMsg(LMSG.ScriptFilter);
}
catch { }
if (sfdlg.ShowDialog() == DialogResult.OK)
{
nowFile = sfdlg.FileName;
SetTitle();
}
else
{
return false;
}
}
}
this.oldtext = this.editor.Text;
File.WriteAllText(this.nowFile, alltext, new UTF8Encoding(false));
return true;
}
public bool SaveAs()
{
return savefile(true);
}
void SaveToolStripMenuItemClick(object sender, EventArgs e)
{
Save();
}
void SaveAsToolStripMenuItemClick(object sender, EventArgs e)
{
SaveAs();
}
#endregion
#region 菜单
//显示/隐藏输入框
void Menuitem_showinputClick(object sender, EventArgs e)
{
if (menuitem_showinput.Checked)
{
menuitem_showinput.Checked = false;
tb_input.Visible = false;
}
else
{
menuitem_showinput.Checked = true;
tb_input.Visible = true;
}
}
//如果是作为mdi,则隐藏菜单
void HideMenu()
{
if (MdiParent == null)
{
return;
}
mainMenu.Visible = false;
menuitem_file.Visible = false;
menuitem_file.Enabled = false;
}
void CodeEditFormLoad(object sender, EventArgs e)
{
ICSharpCode.AvalonEdit.TextEditor editor = new ICSharpCode.AvalonEdit.TextEditor();
ICSharpCode.AvalonEdit.Rendering.TextView eView = new ICSharpCode.AvalonEdit.Rendering.TextView();
}
SearchPanel sp = null;
void Menuitem_findClick(object sender, EventArgs e)
{
if (sp == null)
{
sp = SearchPanel.Install(editor.TextArea);
}
sp.Open();
}
FindReplaceForm frForm = new FindReplaceForm();
void Menuitem_replaceClick(object sender, EventArgs e)
{
frForm.Show();
LanguageHelper.SetFormLabel(frForm);
frForm.btnFind.Click += BtnFind_Click;
frForm.btnReplace.Click += BtnReplace_Click;
frForm.btnReplaceAll.Click += BtnReplaceAll_Click;
frForm.FormClosed += Form_FormClosed;
frForm.txtFind.TextChanged += TxtFind_TextChanged;
}
private void BtnReplaceAll_Click(object sender, EventArgs e)
{
string newText = editor.Text.Replace(frForm.txtFind.Text, frForm.txtReplace.Text);
editor.Document.Replace(0, editor.Document.TextLength, newText);
}
private void BtnReplace_Click(object sender, EventArgs e)
{
if (findStart < 0 || frForm.txtFind.Text == "")
{
return;
}
try
{
var replace = editor.Document.GetText(findStart - frForm.txtFind.Text.Length, frForm.txtFind.Text.Length);
if (replace == frForm.txtFind.Text)
{
editor.Document.Replace(findStart - frForm.txtFind.Text.Length, frForm.txtFind.Text.Length, frForm.txtReplace.Text);
}
}
catch { }
}
private void TxtFind_TextChanged(object sender, EventArgs e)
{
findStart = -1;
}
private void Form_FormClosed(object sender, FormClosedEventArgs e)
{
findStart = -1;
frForm = new FindReplaceForm();
}
int findStart = -1;
private void BtnFind_Click(object sender, EventArgs e)
{
string text = editor.Text;
string findStr = frForm.txtFind.Text;
var rtxt = new RichTextBox();
rtxt.Text = text;
if (findStart < 0)
{
findStart = 0;
}
findStart = rtxt.Find(findStr, findStart, RichTextBoxFinds.MatchCase);
if (findStart >= 0)
{
var line = editor.Document.GetLineByOffset(findStart).LineNumber;
editor.ScrollTo(line, 0);
editor.Select(findStart, findStr.Length);
findStart = findStart + findStr.Length;
}
}
void QuitToolStripMenuItemClick(object sender, EventArgs e)
{
Close();
}
void AboutToolStripMenuItemClick(object sender, EventArgs e)
{
MyMsg.Show(
LanguageHelper.GetMsg(LMSG.About) + "\t" + Application.ProductName + "\n"
+ LanguageHelper.GetMsg(LMSG.Version) + "\t1.1.0.0\n"
+ LanguageHelper.GetMsg(LMSG.Author) + "\tNanahira & JoyJ");
}
void Menuitem_openClick(object sender, EventArgs e)
{
using (OpenFileDialog sfdlg = new OpenFileDialog())
{
try
{
sfdlg.Filter = LanguageHelper.GetMsg(LMSG.ScriptFilter);
}
catch { }
if (sfdlg.ShowDialog() == DialogResult.OK)
{
nowFile = sfdlg.FileName;
this.Open(nowFile);
}
}
}
#endregion
#region 搜索函数
//搜索函数
void Tb_inputKeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Enter)
{
string key = tb_input.Text;
List<AutocompleteItem> list = new List<AutocompleteItem>();
foreach (AutocompleteItem item in items)
{
if (item.ToolTipText.Contains(key))
{
list.Add(item);
}
}
popupMenu.Items.SetAutocompleteItems(list.ToArray());
popupMenu.Show(true);
}
}
#endregion
#region 提示保存
void CodeEditFormFormClosing(object sender, FormClosingEventArgs e)
{
if (!string.IsNullOrEmpty(this.oldtext))
{
if (this.editor.Text != this.oldtext)
{
if (MyMsg.Question(LMSG.IfSaveScript))
{
this.Save();
}
}
}
else if (this.editor.Text.Length > 0)
{
if (MyMsg.Question(LMSG.IfSaveScript))
{
this.Save();
}
}
}
#endregion
private void menuitem_testlua_Click(object sender, EventArgs e)
{
FileInfo fi = new FileInfo(nowFile);
string fn = fi.Name;
if (!fn.ToUpper().EndsWith(".LUA"))
{
return;
}
string cCode = fn.Substring(0, fn.Length - 4);
bool error = false;
try
{
Directory.SetCurrentDirectory(fi.DirectoryName);
Lua lua = new Lua();
var env = lua.CreateEnvironment();
string pre = "Duel={} Effect={} Card={} aux={} Auxiliary={} " + cCode + "={} Duel.LoadScript=function(str) end ";
env.DoChunk(pre + this.editor.Text, "test.lua");
}
catch (LuaException ex)
{
MessageBox.Show($"LINE{ex.Line} - {ex.Message}");
error = true;
}
if (!error)
{
MyMsg.Show(LMSG.syntaxCheckPassed);
}
}
private void effectCreatorToolStripMenuItem_Click(object sender, EventArgs e)
{
EffectCreatorForm form = new EffectCreatorForm();
form.Show();
}
private void OnDragEnter(object sender, DragEventArgs e)
{
e.Effect = DragDropEffects.All;
}
private void OnDragDtop(object sender, DragEventArgs e)
{
string[] drops = (string[])e.Data.GetData(DataFormats.FileDrop);
if (drops == null)
{
return;
}
List<string> files = new List<string>();
foreach (string file in drops)
{
if (Directory.Exists(file))
{
files.AddRange(Directory.EnumerateFiles(file, "*.cdb", SearchOption.AllDirectories));
files.AddRange(Directory.EnumerateFiles(file, "*.lua", SearchOption.AllDirectories));
}
files.Add(file);
}
if (files.Count > 5)
{
if (!MyMsg.Question(LMSG.IfOpenLotsOfFile))
{
return;
}
}
foreach (string file in files)
{
(DockPanel.Parent as MainForm).Open(file);
}
}
private void menuitem_tooltipFont_Click(object sender, EventArgs e)
{
FontDialog fd = new FontDialog();
string fontJson = MyConfig.ReadString(MyConfig.TOOLTIP_FONT);
Font f = new Font("微软雅黑", 10);
JavaScriptSerializer jss = new JavaScriptSerializer();
try
{
f = jss.Deserialize<Font>(fontJson);
}
catch { }
fd.Font = f;
if (fd.ShowDialog() == DialogResult.OK)
{
Common.XMLReader.Save(MyConfig.TOOLTIP_FONT, jss.Serialize(fd.Font));
//this.fctb.lbTooltip.Font = fd.Font;
}
}
}
}
<?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>
<metadata name="mainMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>306, 17</value>
</metadata>
</root>
\ No newline at end of file
...@@ -125,6 +125,10 @@ public class MyConfig : XMLReader ...@@ -125,6 +125,10 @@ public class MyConfig : XMLReader
/// </summary> /// </summary>
public const string TAG_FONT_NAME = "fontname"; public const string TAG_FONT_NAME = "fontname";
/// <summary> /// <summary>
/// 使用的编辑器
/// </summary>
public const string USE_EDITOR = "editor";
/// <summary>
/// 字体大小 /// 字体大小
/// </summary> /// </summary>
public const string TAG_FONT_SIZE = "fontsize"; public const string TAG_FONT_SIZE = "fontsize";
......
...@@ -73,6 +73,8 @@ ...@@ -73,6 +73,8 @@
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL"> <Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll</HintPath> <HintPath>..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference> </Reference>
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.ComponentModel.DataAnnotations" /> <Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.configuration" /> <Reference Include="System.configuration" />
...@@ -98,6 +100,7 @@ ...@@ -98,6 +100,7 @@
<HintPath>..\packages\DockPanelSuite.ThemeVS2015.3.0.6\lib\net40\WeifenLuo.WinFormsUI.Docking.ThemeVS2015.dll</HintPath> <HintPath>..\packages\DockPanelSuite.ThemeVS2015.3.0.6\lib\net40\WeifenLuo.WinFormsUI.Docking.ThemeVS2015.dll</HintPath>
</Reference> </Reference>
<Reference Include="WindowsBase" /> <Reference Include="WindowsBase" />
<Reference Include="WindowsFormsIntegration" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="CodeEditForm_Avalon.cs"> <Compile Include="CodeEditForm_Avalon.cs">
...@@ -182,6 +185,12 @@ ...@@ -182,6 +185,12 @@
<Compile Include="EffectCreatorForm.Designer.cs"> <Compile Include="EffectCreatorForm.Designer.cs">
<DependentUpon>EffectCreatorForm.cs</DependentUpon> <DependentUpon>EffectCreatorForm.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="FindReplaceForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="FindReplaceForm.Designer.cs">
<DependentUpon>FindReplaceForm.cs</DependentUpon>
</Compile>
<Compile Include="PositionForm.cs"> <Compile Include="PositionForm.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
...@@ -216,6 +225,9 @@ ...@@ -216,6 +225,9 @@
<Content Include="data\mse_Chinese-Traditional.txt"> <Content Include="data\mse_Chinese-Traditional.txt">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content> </Content>
<None Include="data\avalon.xshd">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<Content Include="readme_english.txt"> <Content Include="readme_english.txt">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content> </Content>
...@@ -285,6 +297,9 @@ ...@@ -285,6 +297,9 @@
<EmbeddedResource Include="EffectCreatorForm.resx"> <EmbeddedResource Include="EffectCreatorForm.resx">
<DependentUpon>EffectCreatorForm.cs</DependentUpon> <DependentUpon>EffectCreatorForm.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="FindReplaceForm.resx">
<DependentUpon>FindReplaceForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="MainForm.resx"> <EmbeddedResource Include="MainForm.resx">
<DependentUpon>MainForm.cs</DependentUpon> <DependentUpon>MainForm.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
......
namespace DataEditorX
{
partial class FindReplaceForm
{
/// <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.lbFind = new System.Windows.Forms.Label();
this.txtFind = new System.Windows.Forms.TextBox();
this.txtReplace = new System.Windows.Forms.TextBox();
this.lbReplace = new System.Windows.Forms.Label();
this.btnClose = new System.Windows.Forms.Button();
this.btnReplaceAll = new System.Windows.Forms.Button();
this.btnFind = new System.Windows.Forms.Button();
this.btnReplace = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// lbFind
//
this.lbFind.AutoSize = true;
this.lbFind.Location = new System.Drawing.Point(12, 33);
this.lbFind.Name = "lbFind";
this.lbFind.Size = new System.Drawing.Size(27, 12);
this.lbFind.TabIndex = 0;
this.lbFind.Text = "Find";
//
// txtFind
//
this.txtFind.Location = new System.Drawing.Point(64, 30);
this.txtFind.Name = "txtFind";
this.txtFind.Size = new System.Drawing.Size(431, 19);
this.txtFind.TabIndex = 1;
//
// txtReplace
//
this.txtReplace.Location = new System.Drawing.Point(64, 66);
this.txtReplace.Name = "txtReplace";
this.txtReplace.Size = new System.Drawing.Size(431, 19);
this.txtReplace.TabIndex = 3;
//
// lbReplace
//
this.lbReplace.AutoSize = true;
this.lbReplace.Location = new System.Drawing.Point(12, 69);
this.lbReplace.Name = "lbReplace";
this.lbReplace.Size = new System.Drawing.Size(46, 12);
this.lbReplace.TabIndex = 2;
this.lbReplace.Text = "Replace";
//
// btnClose
//
this.btnClose.Location = new System.Drawing.Point(420, 104);
this.btnClose.Name = "btnClose";
this.btnClose.Size = new System.Drawing.Size(75, 23);
this.btnClose.TabIndex = 4;
this.btnClose.Text = "Close";
this.btnClose.UseVisualStyleBackColor = true;
this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
//
// btnReplaceAll
//
this.btnReplaceAll.Location = new System.Drawing.Point(339, 104);
this.btnReplaceAll.Name = "btnReplaceAll";
this.btnReplaceAll.Size = new System.Drawing.Size(75, 23);
this.btnReplaceAll.TabIndex = 5;
this.btnReplaceAll.Text = "Replace All";
this.btnReplaceAll.UseVisualStyleBackColor = true;
//
// btnFind
//
this.btnFind.Location = new System.Drawing.Point(177, 104);
this.btnFind.Name = "btnFind";
this.btnFind.Size = new System.Drawing.Size(75, 23);
this.btnFind.TabIndex = 6;
this.btnFind.Text = "Find";
this.btnFind.UseVisualStyleBackColor = true;
//
// btnReplace
//
this.btnReplace.Location = new System.Drawing.Point(258, 104);
this.btnReplace.Name = "btnReplace";
this.btnReplace.Size = new System.Drawing.Size(75, 23);
this.btnReplace.TabIndex = 7;
this.btnReplace.Text = "Replace";
this.btnReplace.UseVisualStyleBackColor = true;
//
// FindReplaceForm
//
this.AcceptButton = this.btnFind;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.btnClose;
this.ClientSize = new System.Drawing.Size(512, 139);
this.Controls.Add(this.btnReplace);
this.Controls.Add(this.btnFind);
this.Controls.Add(this.btnReplaceAll);
this.Controls.Add(this.btnClose);
this.Controls.Add(this.txtReplace);
this.Controls.Add(this.lbReplace);
this.Controls.Add(this.txtFind);
this.Controls.Add(this.lbFind);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "FindReplaceForm";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Find and Replace";
this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.FindReplaceForm_KeyDown);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Label lbFind;
private System.Windows.Forms.Label lbReplace;
public System.Windows.Forms.TextBox txtFind;
public System.Windows.Forms.TextBox txtReplace;
public System.Windows.Forms.Button btnClose;
public System.Windows.Forms.Button btnReplaceAll;
public System.Windows.Forms.Button btnFind;
public System.Windows.Forms.Button btnReplace;
}
}
\ No newline at end of file
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace DataEditorX
{
public partial class FindReplaceForm : Form
{
public FindReplaceForm()
{
InitializeComponent();
}
private void btnClose_Click(object sender, EventArgs e)
{
DialogResult = DialogResult.Cancel;
Close();
}
private void FindReplaceForm_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Escape)
{
Close();
}
}
}
}
<?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
...@@ -179,6 +179,19 @@ protected override void DefWndProc(ref Message m) ...@@ -179,6 +179,19 @@ protected override void DefWndProc(ref Message m)
#region 打开文件 #region 打开文件
//打开脚本 //打开脚本
void OpenScript(string file) void OpenScript(string file)
{
if (MyConfig.ReadString(MyConfig.USE_EDITOR) == "Avalon")
{
CodeEditForm_Avalon cf = new CodeEditForm_Avalon();
//设置界面语言
LanguageHelper.SetFormLabel(cf);
//初始化函数提示
cf.InitTooltip(this.codecfg);
//打开文件
cf.Open(file);
cf.Show(this.dockPanel, DockState.Document);
}
else
{ {
CodeEditForm cf = new CodeEditForm(); CodeEditForm cf = new CodeEditForm();
//设置界面语言 //设置界面语言
...@@ -191,6 +204,7 @@ void OpenScript(string file) ...@@ -191,6 +204,7 @@ void OpenScript(string file)
cf.Open(file); cf.Open(file);
cf.Show(this.dockPanel, DockState.Document); cf.Show(this.dockPanel, DockState.Document);
} }
}
//打开数据库 //打开数据库
void OpenDataBase(string file) void OpenDataBase(string file)
{ {
...@@ -416,6 +430,11 @@ void Menuitem_newClick(object sender, EventArgs e) ...@@ -416,6 +430,11 @@ void Menuitem_newClick(object sender, EventArgs e)
} }
else else
{ {
try
{
File.Create(file).Dispose();
}
catch { }
this.Open(file); this.Open(file);
} }
} }
......
...@@ -56,7 +56,7 @@ static void SaveLanguage() ...@@ -56,7 +56,7 @@ static void SaveLanguage()
DataEditForm form2 = new DataEditForm(); DataEditForm form2 = new DataEditForm();
LanguageHelper.SetFormLabel(form2); LanguageHelper.SetFormLabel(form2);
langhelper.GetFormLabel(form2); langhelper.GetFormLabel(form2);
CodeEditForm form3 = new CodeEditForm(); CodeEditForm_Avalon form3 = new CodeEditForm_Avalon();
LanguageHelper.SetFormLabel(form3); LanguageHelper.SetFormLabel(form3);
langhelper.GetFormLabel(form3); langhelper.GetFormLabel(form3);
// LANG.GetFormLabel(this); // LANG.GetFormLabel(this);
......
...@@ -44,6 +44,7 @@ ...@@ -44,6 +44,7 @@
<add key="image_other" value="25,54,128,128"/> <add key="image_other" value="25,54,128,128"/>
<add key="image_xyz" value="24,51,128,128"/> <add key="image_xyz" value="24,51,128,128"/>
<add key="image_pendulum" value="16,50,147,109"/> <add key="image_pendulum" value="16,50,147,109"/>
<add key="editor" value="Avalon"/>
<!-- CodeEdiotr Setting <!-- CodeEdiotr Setting
IME = true 使用輸入法,正常顯示文字,反應變慢 IME = true 使用輸入法,正常顯示文字,反應變慢
IME = false English IME = false English
...@@ -52,7 +53,7 @@ ...@@ -52,7 +53,7 @@
<add key="wordwrap" value="true"/> <add key="wordwrap" value="true"/>
<add key="tabisspace" value="false"/> <add key="tabisspace" value="false"/>
<add key="fontname" value="Consolas"/> <add key="fontname" value="Consolas"/>
<add key="fontsize" value="14.5"/> <add key="fontsize" value="18.5"/>
<!-- MSE path--> <!-- MSE path-->
<add key="mse_path" value="./MagicSetEditor2/mse.exe"/> <add key="mse_path" value="./MagicSetEditor2/mse.exe"/>
<add key="mse_exprotpath" value="./exprot"/> <add key="mse_exprotpath" value="./exprot"/>
......
★更新历史 ★更新历史
3.0.1.0 3.0.1.0
更新了一个新的编辑器现在能正常显示中文了。 更新了一个新的编辑器现在能正常显示中文了。
旧编辑器仍可使用,请在菜单里进行切换 一些旧功能无法在新版编辑器中使用,可自行编辑app.config将editor字段改成【Avalon】以外的字符串以启用旧版编辑器
初始化中的m / cm更名为id / this。 初始化中的m / cm更名为id / this。
现在可以初始化各种不同的类型了 修正了新建lua文件失败的bug
3.0.0.6 3.0.0.6
你现在可以在选项菜单中调整函数提示的字体及其大小了。 你现在可以在选项菜单中调整函数提示的字体及其大小了。
现在当滚动到文本末尾时,仍然可以继续向下滚动。 现在当滚动到文本末尾时,仍然可以继续向下滚动。
......
<?xml version="1.0"?>
<SyntaxDefinition name="ygopro" extensions=".slua;.lua" xmlns="http://icsharpcode.net/sharpdevelop/syntaxdefinition/2008">
<!-- The named colors 'Comment' and 'String' are used in SharpDevelop to detect if a line is inside a multiline string/comment -->
<Color name="Comment" foreground="#ff999999" exampleText="-- comment" />
<Color name="String" foreground="#fff99157" />
<Color name="Punctuation" />
<Color name="Functions" fontWeight="bold" foreground="Green" />
<Color name="WrongFunctions" fontWeight="bold" foreground="Red" />
<Color name="MethodCall" foreground="#ffffcc66" fontWeight="bold"/>
<Color name="NumberLiteral" foreground="#ff99cc99"/>
<Color name="NilKeyword" fontWeight="bold"/>
<Color name="Keywords" fontWeight="bold" foreground="#ff6699cc" />
<Color name="GotoKeywords" foreground="#ffcc99cc" />
<Color name="Visibility" fontWeight="bold" foreground="#fff99157"/>
<Color name="TrueFalse" fontWeight="bold" foreground="#ff66cccc" />
<Color name="Constants" foreground="#ff00aeae" />
<RuleSet name="CommentMarkerSet">
<Keywords fontWeight="bold" foreground="#fff2777a">
<Word>TODO</Word>
<Word>FIXME</Word>
</Keywords>
<Keywords fontWeight="bold" foreground="#fff2777a">
<Word>HACK</Word>
<Word>UNDONE</Word>
</Keywords>
</RuleSet>
<RuleSet name="RightFunctions">
</RuleSet>
<!-- This is the main ruleset. -->
<RuleSet>
<Span color="Comment">
<Begin color="XmlDoc/DocComment">---</Begin>
<RuleSet>
<Import ruleSet="XmlDoc/DocCommentSet"/>
<Import ruleSet="CommentMarkerSet"/>
</RuleSet>
</Span>
<Span color="Comment" ruleSet="CommentMarkerSet" multiline="true">
<Begin>--\[[=]*\[</Begin>
<End>\][=]*]</End>
</Span>
<Span color="Comment" ruleSet="CommentMarkerSet">
<Begin>--</Begin>
</Span>
<Span color="String">
<Begin>"</Begin>
<End>"</End>
<RuleSet>
<!-- span for escape sequences -->
<Span begin="\\" end="."/>
</RuleSet>
</Span>
<Span color="String">
<Begin>'</Begin>
<End>'</End>
<RuleSet>
<!-- span for escape sequences -->
<Span begin="\\" end="."/>
</RuleSet>
</Span>
<Span color="String" multiline="true">
<Begin color="String">\[[=]*\[</Begin>
<End>\][=]*]</End>
</Span>
<Keywords color="TrueFalse">
<Word>true</Word>
<Word>false</Word>
</Keywords>
<Keywords color="Keywords">
<Word>and</Word>
<Word>break</Word>
<Word>do</Word>
<Word>else</Word>
<Word>elseif</Word>
<Word>end</Word>
<Word>false</Word>
<Word>for</Word>
<Word>function</Word>
<Word>if</Word>
<Word>in</Word>
<Word>local</Word>
<!--<Word>nil</Word>-->
<Word>not</Word>
<Word>or</Word>
<Word>repeat</Word>
<Word>return</Word>
<Word>then</Word>
<Word>true</Word>
<Word>until</Word>
<Word>while</Word>
<Word>using</Word>
<Word>continue</Word>
</Keywords>
<Keywords color="GotoKeywords">
<Word>break</Word>
<Word>return</Word>
</Keywords>
<Keywords color="Visibility">
<Word>local</Word>
</Keywords>
<Keywords color="NilKeyword">
<Word>nil</Word>
</Keywords>
<Rule color="Constants">
\b(MIN_ID|MAX_ID|MAX_COUNTER|LOCATION_DECK|LOCATION_HAND|LOCATION_MZONE|LOCATION_SZONE|LOCATION_GRAVE|LOCATION_REMOVED|LOCATION_EXTRA|LOCATION_OVERLAY|LOCATION_ONFIELD|LOCATION_DECKBOT|LOCATION_DECKSHF|LOCATION_FZONE|LOCATION_PZONE|POS_FACEUP_ATTACK|POS_FACEDOWN_ATTACK|POS_FACEUP_DEFENSE|POS_FACEDOWN_DEFENSE|POS_FACEUP|POS_FACEDOWN|POS_ATTACK|POS_DEFENSE|NO_FLIP_EFFECT|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|TYPE_PENDULUM|TYPE_SPSUMMON|TYPE_LINK|ATTRIBUTE_EARTH|ATTRIBUTE_WATER|ATTRIBUTE_FIRE|ATTRIBUTE_WIND|ATTRIBUTE_LIGHT|ATTRIBUTE_DARK|ATTRIBUTE_DIVINE|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|REASON_DESTROY|REASON_RELEASE|REASON_TEMPORARY|REASON_MATERIAL|REASON_SUMMON|REASON_BATTLE|REASON_EFFECT|REASON_COST|REASON_ADJUST|REASON_LOST_TARGET|REASON_RULE|REASON_SPSUMMON|REASON_DISSUMMON|REASON_FLIP|REASON_DISCARD|REASON_RDAMAGE|REASON_RRECOVER|REASON_RETURN|REASON_FUSION|REASON_SYNCHRO|REASON_RITUAL|REASON_XYZ|REASON_REPLACE|REASON_DRAW|REASON_REDIRECT|REASON_REVEAL|REASON_LINK|LOCATION_REASON_TOFIELD|LOCATION_REASON_CONTROL|SUMMON_TYPE_NORMAL|SUMMON_TYPE_ADVANCE|SUMMON_TYPE_DUAL|SUMMON_TYPE_FLIP|SUMMON_TYPE_SPECIAL|SUMMON_TYPE_FUSION|SUMMON_TYPE_RITUAL|SUMMON_TYPE_SYNCHRO|SUMMON_TYPE_XYZ|SUMMON_TYPE_PENDULUM|SUMMON_TYPE_LINK|STATUS_DISABLED|STATUS_TO_ENABLE|STATUS_TO_DISABLE|STATUS_PROC_COMPLETE|STATUS_SET_TURN|STATUS_NO_LEVEL|STATUS_BATTLE_RESULT|STATUS_SPSUMMON_STEP|STATUS_FORM_CHANGED|STATUS_SUMMONING|STATUS_EFFECT_ENABLED|STATUS_SUMMON_TURN|STATUS_DESTROY_CONFIRMED|STATUS_LEAVE_CONFIRMED|STATUS_BATTLE_DESTROYED|STATUS_COPYING_EFFECT|STATUS_CHAINING|STATUS_SUMMON_DISABLED|STATUS_ACTIVATE_DISABLED|STATUS_EFFECT_REPLACED|STATUS_FUTURE_FUSION|STATUS_ATTACK_CANCELED|STATUS_INITIALIZING|STATUS_ACTIVATED|STATUS_JUST_POS|STATUS_CONTINUOUS_POS|STATUS_FORBIDDEN|STATUS_ACT_FROM_HAND|STATUS_OPPO_BATTLE|STATUS_FLIP_SUMMON_TURN|STATUS_SPSUMMON_TURN|ASSUME_CODE|ASSUME_TYPE|ASSUME_LEVEL|ASSUME_RANK|ASSUME_ATTRIBUTE|ASSUME_RACE|ASSUME_ATTACK|ASSUME_DEFENSE|LINK_MARKER_BOTTOM_LEFT|LINK_MARKER_BOTTOM|LINK_MARKER_BOTTOM_RIGHT|LINK_MARKER_LEFT|LINK_MARKER_RIGHT|LINK_MARKER_TOP_LEFT|LINK_MARKER_TOP|LINK_MARKER_TOP_RIGHT|COUNTER_WITHOUT_PERMIT|COUNTER_NEED_ENABLE|PHASE_DRAW|PHASE_STANDBY|PHASE_MAIN1|PHASE_BATTLE_START|PHASE_BATTLE_STEP|PHASE_DAMAGE|PHASE_DAMAGE_CAL|PHASE_BATTLE|PHASE_MAIN2|PHASE_END|PLAYER_NONE|PLAYER_ALL|CHAININFO_CHAIN_COUNT|CHAININFO_TRIGGERING_EFFECT|CHAININFO_TRIGGERING_PLAYER|CHAININFO_TRIGGERING_CONTROLER|CHAININFO_TRIGGERING_LOCATION|CHAININFO_TRIGGERING_SEQUENCE|CHAININFO_TARGET_CARDS|CHAININFO_TARGET_PLAYER|CHAININFO_TARGET_PARAM|CHAININFO_DISABLE_REASON|CHAININFO_DISABLE_PLAYER|CHAININFO_CHAIN_ID|CHAININFO_TYPE|CHAININFO_EXTTYPE|CHAININFO_TRIGGERING_POSITION|CHAININFO_TRIGGERING_CODE|CHAININFO_TRIGGERING_CODE2|CHAININFO_TRIGGERING_LEVEL|CHAININFO_TRIGGERING_RANK|CHAININFO_TRIGGERING_ATTRIBUTE|CHAININFO_TRIGGERING_RACE|CHAININFO_TRIGGERING_ATTACK|CHAININFO_TRIGGERING_DEFENSE|RESET_SELF_TURN|RESET_OPPO_TURN|RESET_PHASE|RESET_CHAIN|RESET_EVENT|RESET_CARD|RESET_CODE|RESET_COPY|RESET_DISABLE|RESET_TURN_SET|RESET_TOGRAVE|RESET_REMOVE|RESET_TEMP_REMOVE|RESET_TOHAND|RESET_TODECK|RESET_LEAVE|RESET_TOFIELD|RESET_CONTROL|RESET_OVERLAY|RESET_MSCHANGE|RESETS_STANDARD|RESETS_REDIRECT|EFFECT_TYPE_SINGLE|EFFECT_TYPE_FIELD|EFFECT_TYPE_EQUIP|EFFECT_TYPE_ACTIONS|EFFECT_TYPE_ACTIVATE|EFFECT_TYPE_FLIP|EFFECT_TYPE_IGNITION|EFFECT_TYPE_TRIGGER_O|EFFECT_TYPE_QUICK_O|EFFECT_TYPE_TRIGGER_F|EFFECT_TYPE_QUICK_F|EFFECT_TYPE_CONTINUOUS|EFFECT_TYPE_XMATERIAL|EFFECT_TYPE_GRANT|EFFECT_TYPE_TARGETEFFECT_FLAG_INITIAL|EFFECT_FLAG_FUNC_VALUE|EFFECT_FLAG_COUNT_LIMIT|EFFECT_FLAG_FIELD_ONLY|EFFECT_FLAG_CARD_TARGET|EFFECT_FLAG_IGNORE_RANGE|EFFECT_FLAG_ABSOLUTE_TARGET|EFFECT_FLAG_IGNORE_IMMUNE|EFFECT_FLAG_SET_AVAILABLE|EFFECT_FLAG_CANNOT_NEGATE|EFFECT_FLAG_CANNOT_DISABLE|EFFECT_FLAG_PLAYER_TARGET|EFFECT_FLAG_BOTH_SIDE|EFFECT_FLAG_COPY_INHERIT|EFFECT_FLAG_DAMAGE_STEP|EFFECT_FLAG_DAMAGE_CAL|EFFECT_FLAG_DELAY|EFFECT_FLAG_SINGLE_RANGE|EFFECT_FLAG_UNCOPYABLE|EFFECT_FLAG_OATH|EFFECT_FLAG_SPSUM_PARAM|EFFECT_FLAG_REPEAT|EFFECT_FLAG_NO_TURN_RESET|EFFECT_FLAG_EVENT_PLAYER|EFFECT_FLAG_OWNER_RELATE|EFFECT_FLAG_CANNOT_INACTIVATE|EFFECT_FLAG_CLIENT_HINT|EFFECT_FLAG_CONTINUOUS_TARGET|EFFECT_FLAG_LIMIT_ZONE|EFFECT_FLAG_COF|EFFECT_FLAG_CVAL_CHECK|EFFECT_FLAG_IMMEDIATELY_APPLY|EFFECT_FLAG2_NAGA|EFFECT_FLAG2_COF|EFFECT_IMMUNE_EFFECT|EFFECT_DISABLE|EFFECT_CANNOT_DISABLE|EFFECT_SET_CONTROL|EFFECT_CANNOT_CHANGE_CONTROL|EFFECT_CANNOT_ACTIVATE|EFFECT_CANNOT_TRIGGER|EFFECT_DISABLE_EFFECT|EFFECT_DISABLE_CHAIN|EFFECT_DISABLE_TRAPMONSTER|EFFECT_CANNOT_INACTIVATE|EFFECT_CANNOT_DISEFFECT|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_SSET|EFFECT_CANNOT_DRAW|EFFECT_CANNOT_DISABLE_SUMMON|EFFECT_CANNOT_DISABLE_SPSUMMON|EFFECT_SET_SUMMON_COUNT_LIMIT|EFFECT_EXTRA_SUMMON_COUNT|EFFECT_SPSUMMON_CONDITION|EFFECT_REVIVE_LIMIT|EFFECT_SUMMON_PROC|EFFECT_LIMIT_SUMMON_PROC|EFFECT_SPSUMMON_PROC|EFFECT_EXTRA_SET_COUNT|EFFECT_SET_PROC|EFFECT_LIMIT_SET_PROC|EFFECT_DEVINE_LIGHT|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|EFFECT_UNRELEASABLE_EFFECT|EFFECT_DESTROY_REPLACE|EFFECT_RELEASE_REPLACE|EFFECT_SEND_REPLACE|EFFECT_CANNOT_DISCARD_HAND|EFFECT_CANNOT_DISCARD_DECK|EFFECT_CANNOT_USE_AS_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_REMOVE_REDIRECT|EFFECT_CANNOT_TO_HAND|EFFECT_CANNOT_TO_DECK|EFFECT_CANNOT_REMOVE|EFFECT_CANNOT_TO_GRAVE|EFFECT_CANNOT_TURN_SET|EFFECT_CANNOT_BE_BATTLE_TARGET|EFFECT_CANNOT_BE_EFFECT_TARGET|EFFECT_IGNORE_BATTLE_TARGET|EFFECT_CANNOT_DIRECT_ATTACK|EFFECT_DIRECT_ATTACK|EFFECT_DUAL_STATUS|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|EFFECT_SET_BASE_ATTACK|EFFECT_UPDATE_DEFENSE|EFFECT_SET_DEFENSE|EFFECT_SET_DEFENSE_FINAL|EFFECT_SET_BASE_DEFENSE|EFFECT_REVERSE_UPDATE|EFFECT_SWAP_AD|EFFECT_SWAP_BASE_AD|EFFECT_SWAP_ATTACK_FINAL|EFFECT_SWAP_DEFENSE_FINAL|EFFECT_ADD_CODE|EFFECT_CHANGE_CODE|EFFECT_ADD_TYPE|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_UPDATE_RANK|EFFECT_CHANGE_RANK|EFFECT_UPDATE_LSCALE|EFFECT_CHANGE_LSCALE|EFFECT_UPDATE_RSCALE|EFFECT_CHANGE_RSCALE|EFFECT_SET_POSITION|EFFECT_SELF_DESTROY|EFFECT_SELF_TOGRAVE|EFFECT_DOUBLE_TRIBUTE|EFFECT_DECREASE_TRIBUTE|EFFECT_DECREASE_TRIBUTE_SET|EFFECT_EXTRA_RELEASE|EFFECT_TRIBUTE_LIMIT|EFFECT_EXTRA_RELEASE_SUM|EFFECT_TRIPLE_TRIBUTE|EFFECT_ADD_EXTRA_TRIBUTE|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|EFFECT_SKIP_BP|EFFECT_SKIP_M2|EFFECT_CANNOT_BP|EFFECT_CANNOT_M2|EFFECT_CANNOT_EP|EFFECT_SKIP_TURN|EFFECT_DEFENSE_ATTACK|EFFECT_MUST_ATTACK|EFFECT_FIRST_ATTACK|EFFECT_ATTACK_ALL|EFFECT_EXTRA_ATTACK|EFFECT_MUST_BE_ATTACKED|EFFECT_ONLY_BE_ATTACKED|EFFECT_ATTACK_DISABLED|EFFECT_NO_BATTLE_DAMAGE|EFFECT_AVOID_BATTLE_DAMAGE|EFFECT_REFLECT_BATTLE_DAMAGE|EFFECT_PIERCE|EFFECT_BATTLE_DESTROY_REDIRECT|EFFECT_BATTLE_DAMAGE_TO_EFFECT|EFFECT_BOTH_BATTLE_DAMAGE|EFFECT_ALSO_BATTLE_DAMAGE|EFFECT_CHANGE_BATTLE_DAMAGE|EFFECT_TOSS_COIN_REPLACE|EFFECT_TOSS_DICE_REPLACE|EFFECT_FUSION_MATERIAL|EFFECT_CHAIN_MATERIAL|EFFECT_SYNCHRO_MATERIAL|EFFECT_XYZ_MATERIAL|EFFECT_FUSION_SUBSTITUTE|EFFECT_CANNOT_BE_FUSION_MATERIAL|EFFECT_CANNOT_BE_SYNCHRO_MATERIAL|EFFECT_SYNCHRO_MATERIAL_CUSTOM|EFFECT_CANNOT_BE_XYZ_MATERIAL|EFFECT_CANNOT_BE_LINK_MATERIAL|EFFECT_SYNCHRO_LEVEL|EFFECT_RITUAL_LEVEL|EFFECT_XYZ_LEVEL|EFFECT_EXTRA_RITUAL_MATERIAL|EFFECT_NONTUNER|EFFECT_OVERLAY_REMOVE_REPLACE|EFFECT_SCRAP_CHIMERA|EFFECT_TUNE_MAGICIAN_X|EFFECT_TUNE_MAGICIAN_F|EFFECT_PRE_MONSTER|EFFECT_MATERIAL_CHECK|EFFECT_DISABLE_FIELD|EFFECT_USE_EXTRA_MZONE|EFFECT_USE_EXTRA_SZONE|EFFECT_MAX_MZONE|EFFECT_MAX_SZONE|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|EFFECT_UNIQUE_CHECK|EFFECT_MATCH_KILL|EFFECT_SYNCHRO_CHECK|EFFECT_QP_ACT_IN_NTPHAND|EFFECT_MUST_BE_SMATERIAL|EFFECT_TO_GRAVE_REDIRECT_CB|EFFECT_CHANGE_LEVEL_FINAL|EFFECT_CHANGE_RANK_FINAL|EFFECT_MUST_BE_FMATERIAL|EFFECT_MUST_BE_XMATERIAL|EFFECT_MUST_BE_LMATERIAL|EFFECT_SPSUMMON_PROC_G|EFFECT_SPSUMMON_COUNT_LIMIT|EFFECT_LEFT_SPSUMMON_COUNT|EFFECT_CANNOT_SELECT_BATTLE_TARGET|EFFECT_CANNOT_SELECT_EFFECT_TARGET|EFFECT_ADD_SETCODE|EFFECT_NO_EFFECT_DAMAGE|EFFECT_UNSUMMONABLE_CARD|EFFECT_DISABLE_CHAIN_FIELD|EFFECT_DISCARD_COST_CHANGE|EFFECT_HAND_SYNCHRO|EFFECT_ADD_FUSION_CODE|EFFECT_ADD_FUSION_SETCODE|EFFECT_RISE_TO_FULL_HEIGHT|EFFECT_ONLY_ATTACK_MONSTER|EFFECT_MUST_ATTACK_MONSTER|EFFECT_PATRICIAN_OF_DARKNESS|EFFECT_EXTRA_ATTACK_MONSTER|EFFECT_UNION_STATUS|EFFECT_OLDUNION_STATUS|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|EFFECT_MATERIAL_LIMIT|EFFECT_SET_BATTLE_ATTACK|EFFECT_SET_BATTLE_DEFENSE|EVENT_STARTUP|EVENT_FLIP|EVENT_FREE_CHAIN|EVENT_DESTROY|EVENT_REMOVE|EVENT_TO_HAND|EVENT_TO_DECK|EVENT_TO_GRAVE|EVENT_LEAVE_FIELD|EVENT_CHANGE_POS|EVENT_RELEASE|EVENT_DISCARD|EVENT_LEAVE_FIELD_P|EVENT_CHAIN_SOLVING|EVENT_CHAIN_ACTIVATING|EVENT_CHAIN_SOLVED|EVENT_CHAIN_ACTIVATED|EVENT_CHAIN_NEGATED|EVENT_CHAIN_DISABLED|EVENT_CHAIN_END|EVENT_CHAINING|EVENT_BECOME_TARGET|EVENT_DESTROYED|EVENT_MOVE|EVENT_ADJUST|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|EVENT_PRE_BATTLE_DAMAGE|EVENT_BATTLE_END|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|EVENT_RETURN_TO_GRAVE|EVENT_TURN_END|EVENT_PHASE|EVENT_PHASE_START|EVENT_ADD_COUNTER|EVENT_REMOVE_COUNTER|EVENT_CUSTOM|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|HINT_EVENT|HINT_MESSAGE|HINT_SELECTMSG|HINT_OPSELECTED|HINT_EFFECT|HINT_RACE|HINT_ATTRIB|HINT_CODE|HINT_NUMBER|HINT_CARD|HINT_ZONE|HINT_MUSIC|HINT_SOUND|HINT_MUSIC_OGG|CHINT_TURN|CHINT_CARD|CHINT_RACE|CHINT_ATTRIBUTE|CHINT_NUMBER|CHINT_DESC|OPCODE_ADD|OPCODE_SUB|OPCODE_MUL|OPCODE_DIV|OPCODE_AND|OPCODE_OR|OPCODE_NEG|OPCODE_NOT|OPCODE_ISCODE|OPCODE_ISSETCARD|OPCODE_ISTYPE|OPCODE_ISRACE|OPCODE_ISATTRIBUTE|--|DOUBLE_DAMAGE|HALF_DAMAGE|HINTMSG_RELEASE|HINTMSG_DISCARD|HINTMSG_DESTROY|HINTMSG_REMOVE|HINTMSG_TOGRAVE|HINTMSG_RTOHAND|HINTMSG_ATOHAND|HINTMSG_TODECK|HINTMSG_SUMMON|HINTMSG_SPSUMMON|HINTMSG_SET|HINTMSG_FMATERIAL|HINTMSG_SMATERIAL|HINTMSG_XMATERIAL|HINTMSG_FACEUP|HINTMSG_FACEDOWN|HINTMSG_ATTACK|HINTMSG_DEFENSE|HINTMSG_EQUIP|HINTMSG_REMOVEXYZ|HINTMSG_CONTROL|HINTMSG_DESREPLACE|HINTMSG_FACEUPATTACK|HINTMSG_FACEUPDEFENSE|HINTMSG_FACEDOWNATTACK|HINTMSG_FACEDOWNDEFENSE|HINTMSG_CONFIRM|HINTMSG_TOFIELD|HINTMSG_POSCHANGE|HINTMSG_SELF|HINTMSG_OPPO|HINTMSG_TRIBUTE|HINTMSG_DEATTACHFROM|HINTMSG_LMATERIAL|HINTMSG_ATTACKTARGET|HINTMSG_EFFECT|HINTMSG_TARGET|HINTMSG_COIN|HINTMSG_DICE|HINTMSG_CARDTYPE|HINTMSG_OPTION|HINTMSG_RESOLVEEFFECT|HINTMSG_SELECT|HINTMSG_POSITION|HINTMSG_ATTRIBUTE|HINTMSG_RACE|HINTMSG_CODE|HINGMSG_NUMBER|HINGMSG_LVRANK|HINTMSG_RESOLVECARD|HINTMSG_ZONE|HINTMSG_DISABLEZONE|HINTMSG_TOZONE|HINTMSG_COUNTER|HINTMSG_DISABLE|HINTMSG_OPERATECARD|SELECT_HEADS|SELECT_TAILS|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|TIMINGS_CHECK_MONSTER|GLOBALFLAG_DECK_REVERSE_CHECK|GLOBALFLAG_BRAINWASHING_CHECK|GLOBALFLAG_SCRAP_CHIMERA|GLOBALFLAG_DELAYED_QUICKEFFECT|GLOBALFLAG_DETACH_EVENT|GLOBALFLAG_MUST_BE_SMATERIAL|GLOBALFLAG_SPSUMMON_COUNT|GLOBALFLAG_XMAT_COUNT_LIMIT|GLOBALFLAG_SELF_TOGRAVE|GLOBALFLAG_SPSUMMON_ONCE|GLOBALFLAG_TUNE_MAGICIAN|EFFECT_COUNT_CODE_OATH|EFFECT_COUNT_CODE_DUEL|EFFECT_COUNT_CODE_SINGLE|DUEL_TEST_MODE|DUEL_ATTACK_FIRST_TURN|DUEL_NO_CHAIN_HINT|DUEL_OBSOLETE_RULING|DUEL_PSEUDO_SHUFFLE|DUEL_TAG_MODE|DUEL_SIMPLE_AI|ACTIVITY_SUMMON|ACTIVITY_NORMALSUMMON|ACTIVITY_SPSUMMON|ACTIVITY_FLIPSUMMON|ACTIVITY_ATTACK|ACTIVITY_BATTLE_PHASE|ACTIVITY_CHAIN|CARD_MARINE_DOLPHIN|CARD_TWINKLE_MOSS)\b
</Rule>
<Rule color="Functions">
\bCard\.(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)\b
</Rule>
<Rule color="Functions">
\b([a-z]{0,3}c|a|d[0-9]{0,2}):(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)\b
</Rule>
<Rule color="Functions">
\bDuel\.(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)\b
</Rule>
<Rule color="Functions">
\bGroup\.(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|SelectSubGroup|SelectSubGroupEach|CheckSubGroupEach|CheckSubGroup|SelectSubGroup|SelectSubGroupEach|CheckSubGroup|CheckSubGroupEach)
</Rule>
<Rule color="Functions">
\b[a-z]{0,3}g[0-9]{0,2}:(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|SelectSubGroup|SelectSubGroupEach|CheckSubGroupEach|CheckSubGroup|SelectSubGroup|SelectSubGroupEach|CheckSubGroup|CheckSubGroupEach)
</Rule>
<Rule color="Functions">
\bEffect\.(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)
</Rule>
<Rule color="Functions">
\b[a-z]{0,1}e[0-9v]{0,2}:(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)
</Rule>
<Rule color="Functions">
\bDebug\.(Message|AddCard|SetPlayerInfo|PreSummon|PreEquip|PreSetTarget|PreAddCounter|ReloadFieldBegin|ReloadFieldEnd|SetAIName|ShowHint)
</Rule>
<Rule color="Functions">
\b(Auxiliary.PreloadUds|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|Auxiliary.CreateChecks|Auxiliary.CheckGroupRecursiveEach|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|aux.CreateChecks|aux.CheckGroupRecursiveEach|aux.nbcon|aux.tdcfop)
</Rule>
<Rule color="Punctuation">
[?,.;()\[\]{}+\-/%*&lt;&gt;^+~!|&amp;]+
</Rule>
<Rule color="WrongFunctions">
\b(Duel\.[A-Za-z_0-9]+)\b
</Rule>
<Rule color="WrongFunctions">
\b(Card\.[A-Za-z_0-9]+)\b
</Rule>
<Rule color="WrongFunctions">
\b(Group\.[A-Za-z_0-9]+)\b
</Rule>
<Rule color="WrongFunctions">
\b(Effect\.[A-Za-z_0-9]+)\b
</Rule>
<Rule color="WrongFunctions">
\b(Debug\.[A-Za-z_0-9]+)\b
</Rule>
<Rule color="WrongFunctions">
\b(Auxiliary\.[A-Za-z_0-9]+)\b
</Rule>
<Rule color="WrongFunctions">
\b(aux\.[A-Za-z_0-9]+)\b
</Rule>
<Rule color="WrongFunctions">
\b([a-z]{0,3}c|a|d):([A-Za-z_0-9]+)\b
</Rule>
<Rule color="WrongFunctions">
\b[a-z]{0,3}g[0-9]{0,2}:([A-Za-z_0-9]+)\b
</Rule>
<Rule color="WrongFunctions">
\b[a-z]{0,1}e[0-9v]{0,2}:([A-Za-z_0-9]+)\b
</Rule>
<Rule color="WrongFunctions">
\be[0-9v][0-9]{0,1}:([A-Za-z_0-9]+)\b
</Rule>
<Rule color="WrongFunctions">
\bc[0-9]+\b
</Rule>
<!-- Mark previous rule-->
<Rule color="MethodCall">
\b
[\d\w_]+ # an identifier
(?=\s*\() # followed by (
</Rule>
<Rule color="MethodCall">
\b
[\d\w_]+ # an identifier
(?=\s*\") # followed by "
</Rule>
<Rule color="MethodCall">
\b
[\d\w_]+ # an identifier
(?=\s*\') # followed by '
</Rule>
<Rule color="MethodCall">
\b
[\d\w_]+ # an identifier
(?=\s*\{) # followed by {
</Rule>
<Rule color="MethodCall">
\b
[\d\w_]+ # an identifier
(?=\s*\[) # followed by [
</Rule>
<!-- Digits -->
<Rule color="NumberLiteral">
\b0[xX][0-9a-fA-F]+ # hex number
|
( \b\d+(\.[0-9]+)? #number with optional floating point
| \.[0-9]+ #or just starting with floating point
)
([eE][+-]?[0-9]+)? # optional exponent
</Rule>
</RuleSet>
</SyntaxDefinition>
\ No newline at end of file
...@@ -17,6 +17,32 @@ CodeEditForm.mainMenu.menuitem_tools 工具(&T) ...@@ -17,6 +17,32 @@ CodeEditForm.mainMenu.menuitem_tools 工具(&T)
CodeEditForm.mainMenu.menuitem_testlua 语法错误检查 CodeEditForm.mainMenu.menuitem_testlua 语法错误检查
CodeEditForm.mainMenu.menuitem_effectcreator 效果生成器 CodeEditForm.mainMenu.menuitem_effectcreator 效果生成器
# #
FindReplaceForm 查找/替换
FindReplaceForm.btnFind 查找
FindReplaceForm.btnReplace 替换
FindReplaceForm.btnReplaceAll 替换所有
FindReplaceForm.btnClose 关闭
FindReplaceForm.lbFind 查找
FindReplaceForm.lbReplace 替换
#
CodeEditForm_Avalon.mainMenu.menuitem_file 文件(&F)
CodeEditForm_Avalon.mainMenu.menuitem_open 打开
CodeEditForm_Avalon.mainMenu.menuitem_save 保存
CodeEditForm_Avalon.mainMenu.menuitem_saveas 另存为
CodeEditForm_Avalon.mainMenu.menuitem_quit 退出
CodeEditForm_Avalon.mainMenu.menuitem_setting 选项(&S)
CodeEditForm_Avalon.mainMenu.menuitem_tooltipFont 设置函数提示字体
CodeEditForm_Avalon.mainMenu.menuitem_showmap 显示/隐藏结构图
CodeEditForm_Avalon.mainMenu.menuitem_showinput 显示/隐藏输入框
CodeEditForm_Avalon.mainMenu.menuitem_find 查找
CodeEditForm_Avalon.mainMenu.menuitem_replace 替换
CodeEditForm_Avalon.mainMenu.menuitem_setcard 设置卡片库
CodeEditForm_Avalon.mainMenu.menuitem_help 帮助(&H)
CodeEditForm_Avalon.mainMenu.menuitem_about 关于
CodeEditForm_Avalon.mainMenu.menuitem_tools 工具(&T)
CodeEditForm_Avalon.mainMenu.menuitem_testlua 语法错误检查
CodeEditForm_Avalon.mainMenu.menuitem_effectcreator 效果生成器
#
DataEditForm.pl_bottom.btn_img 导入图片 DataEditForm.pl_bottom.btn_img 导入图片
DataEditForm.pl_main.splitContainer..lb_types 卡片类型 DataEditForm.pl_main.splitContainer..lb_types 卡片类型
DataEditForm.pl_main.splitContainer..lb_markers 连接标记 DataEditForm.pl_main.splitContainer..lb_markers 连接标记
......
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