Commit aad5883f authored by rarnu's avatar rarnu

add: 增加关于界面,修复目录建立的问题

parent 92fbc837
...@@ -17,3 +17,5 @@ Data/ ...@@ -17,3 +17,5 @@ Data/
backup/ backup/
*.lps *.lps
Thumbs.db
lib/
PuzzleEditor.ico

130 KB | W: | H:

PuzzleEditor.ico

74.9 KB | W: | H:

PuzzleEditor.ico
PuzzleEditor.ico
PuzzleEditor.ico
PuzzleEditor.ico
  • 2-up
  • Swipe
  • Onion skin
...@@ -10,11 +10,22 @@ uses ...@@ -10,11 +10,22 @@ uses
athreads, athreads,
{$ENDIF} {$ENDIF}
Interfaces, // this includes the LCL widgetset Interfaces, // this includes the LCL widgetset
Forms, opensslsockets, untData, frmHome; SysUtils,
Forms, Dialogs, opensslsockets, untData, frmHome;
{$R *.res} {$R *.res}
var
AMDPro3Path: string;
ADataPath: string;
begin begin
AMDPro3Path:= ExtractFilePath(ParamStr(0)) + 'MDPro3.exe';
ADataPath:= ExtractFilePath(ParamStr(0)) + 'Data';
if (not FileExists(AMDPro3Path)) or (not DirectoryExists(ADataPath)) then begin
ShowMessage('请将残局编辑器放置到 MDPro3 的安装目录下');
Exit;
end;
RequireDerivedFormResource:=True; RequireDerivedFormResource:=True;
Application.Scaled:=True; Application.Scaled:=True;
Application.Initialize; Application.Initialize;
......
No preview for this file type
# 残局编辑器 # 残局编辑器
## 使用方法
```PuzzleEditor.exe``` 放置到 MDPro3 的根目录下,双击即可打开。
## 功能清单
1. [x] 决斗场地
2. [x] 向卡片区域添加卡片
3. [x] 按名字模糊搜索卡片
4. [x] 向卡片列表区域添加卡片
5. [x] 为卡片设置属性
6. [x] 为超量怪兽设置超量素材
7. [x] 设置在列表中的卡片属性
8. [x] 为连接怪兽的特殊处理
9. [x] 为灵摆怪兽的特殊处理
10. [x] 卡片装备到另一张卡片
11. [x] 卡片的永续效果影响其他卡片
12. [x] 卡片变更控制权
13. [x] 变更卡片的类型(如百夫长在后场视为永续陷阱)
14. [x] 保存和读取残局设置
15. [x] 导出为残局脚本(lua脚本)
## 软件截图
![](screenshot/p1.png)
![](screenshot/pro3.png)
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -5,15 +5,27 @@ unit frmAbout; ...@@ -5,15 +5,27 @@ unit frmAbout;
interface interface
uses uses
Classes, SysUtils, Forms, Controls, Graphics, Dialogs, orca_scene2d; Classes, SysUtils, Forms, Controls, Graphics, Dialogs, orca_scene2d, LCLIntf;
type type
{ TFormAbout } { TFormAbout }
TFormAbout = class(TForm) TFormAbout = class(TForm)
Image1: TD2Image;
Label1: TD2Label;
Label2: TD2Label;
Label3: TD2Label;
lblGitlab: TD2Label;
Label5: TD2Label;
Line1: TD2Line;
Root1: TD2Background; Root1: TD2Background;
Scene: TD2Scene; Scene: TD2Scene;
procedure FormKeyPress(Sender: TObject; var Key: char);
procedure lblGitlabClick(Sender: TObject);
procedure lblGitlabMouseEnter(Sender: TObject);
procedure lblGitlabMouseLeave(Sender: TObject);
procedure Root1Click(Sender: TObject);
private private
public public
...@@ -27,5 +39,32 @@ implementation ...@@ -27,5 +39,32 @@ implementation
{$R *.lfm} {$R *.lfm}
{ TFormAbout }
procedure TFormAbout.lblGitlabMouseEnter(Sender: TObject);
begin
lblGitlab.Font.Style:= d2FontUnderline;
end;
procedure TFormAbout.FormKeyPress(Sender: TObject; var Key: char);
begin
if (Key = #27) then Close;
end;
procedure TFormAbout.lblGitlabClick(Sender: TObject);
begin
LCLIntf.OpenURL('https://code.moenext.com/rarnu/puzzle-editor');
end;
procedure TFormAbout.lblGitlabMouseLeave(Sender: TObject);
begin
lblGitlab.Font.Style:= d2FontRegular;
end;
procedure TFormAbout.Root1Click(Sender: TObject);
begin
Close;
end;
end. end.
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -951,11 +951,13 @@ procedure TFormHome.btnConfigClick(Sender: TObject); ...@@ -951,11 +951,13 @@ procedure TFormHome.btnConfigClick(Sender: TObject);
begin begin
// config // config
with TFormPuzzleConfig.Create(Self) do begin with TFormPuzzleConfig.Create(Self) do begin
PAIName:= FPuzzle.AIName;
P0LP:= FPuzzle.LPSelf; P0LP:= FPuzzle.LPSelf;
P1LP:= FPuzzle.LPOpponent; P1LP:= FPuzzle.LPOpponent;
PMessage:= FPuzzle.Message; PMessage:= FPuzzle.Message;
PSolution:= FPuzzle.Solution; PSolution:= FPuzzle.Solution;
if ShowModal = mrOK then begin if ShowModal = mrOK then begin
FPuzzle.AIName:= PAIName;
FPuzzle.LPSelf:= P0LP; FPuzzle.LPSelf:= P0LP;
FPuzzle.LPOpponent:= P1LP; FPuzzle.LPOpponent:= P1LP;
FPuzzle.Message:= PMessage; FPuzzle.Message:= PMessage;
......
...@@ -26,7 +26,7 @@ object FormPuzzleConfig: TFormPuzzleConfig ...@@ -26,7 +26,7 @@ object FormPuzzleConfig: TFormPuzzleConfig
HitTest = False HitTest = False
object Layout1: TD2Layout object Layout1: TD2Layout
Align = vaTop Align = vaTop
Position.Point = '(16,16)' Position.Point = '(16,96)'
Width = 868 Width = 868
Height = 80 Height = 80
object Label1: TD2Label object Label1: TD2Label
...@@ -62,7 +62,7 @@ object FormPuzzleConfig: TFormPuzzleConfig ...@@ -62,7 +62,7 @@ object FormPuzzleConfig: TFormPuzzleConfig
end end
object Layout2: TD2Layout object Layout2: TD2Layout
Align = vaTop Align = vaTop
Position.Point = '(16,96)' Position.Point = '(16,176)'
Width = 868 Width = 868
Height = 80 Height = 80
object Label2: TD2Label object Label2: TD2Label
...@@ -98,7 +98,7 @@ object FormPuzzleConfig: TFormPuzzleConfig ...@@ -98,7 +98,7 @@ object FormPuzzleConfig: TFormPuzzleConfig
end end
object Layout3: TD2Layout object Layout3: TD2Layout
Align = vaTop Align = vaTop
Position.Point = '(16,176)' Position.Point = '(16,256)'
Width = 868 Width = 868
Height = 400 Height = 400
object Label3: TD2Label object Label3: TD2Label
...@@ -122,14 +122,17 @@ object FormPuzzleConfig: TFormPuzzleConfig ...@@ -122,14 +122,17 @@ object FormPuzzleConfig: TFormPuzzleConfig
Height = 304 Height = 304
Padding.Rect = '(8,8,8,8)' Padding.Rect = '(8,8,8,8)'
TabOrder = 1 TabOrder = 1
WordWrap = False UseSmallScrollBars = True
WordWrap = True
Font.Family = 'Microsoft Yahei'
Font.Size = 24
end end
end end
object Layout4: TD2Layout object Layout4: TD2Layout
Align = vaClient Align = vaClient
Position.Point = '(16,576)' Position.Point = '(16,656)'
Width = 868 Width = 868
Height = 528 Height = 448
object Label4: TD2Label object Label4: TD2Label
Align = vaTop Align = vaTop
Position.Point = '(8,0)' Position.Point = '(8,0)'
...@@ -148,10 +151,13 @@ object FormPuzzleConfig: TFormPuzzleConfig ...@@ -148,10 +151,13 @@ object FormPuzzleConfig: TFormPuzzleConfig
Align = vaClient Align = vaClient
Position.Point = '(8,88)' Position.Point = '(8,88)'
Width = 852 Width = 852
Height = 432 Height = 352
Padding.Rect = '(8,8,8,8)' Padding.Rect = '(8,8,8,8)'
TabOrder = 1 TabOrder = 1
WordWrap = False UseSmallScrollBars = True
WordWrap = True
Font.Family = 'Microsoft Yahei'
Font.Size = 24
end end
end end
object Layout5: TD2Layout object Layout5: TD2Layout
...@@ -196,6 +202,39 @@ object FormPuzzleConfig: TFormPuzzleConfig ...@@ -196,6 +202,39 @@ object FormPuzzleConfig: TFormPuzzleConfig
Sides = [d2SideTop, d2SideLeft, d2SideBottom, d2SideRight] Sides = [d2SideTop, d2SideLeft, d2SideBottom, d2SideRight]
end end
end end
object Layout6: TD2Layout
Align = vaTop
Position.Point = '(16,16)'
Width = 868
Height = 80
object Label5: TD2Label
Align = vaLeft
Position.Point = '(8,0)'
Width = 180
Height = 80
Padding.Rect = '(8,0,0,0)'
TabOrder = 0
Font.Family = 'Microsoft yahei'
Font.Size = 24
Font.Style = d2FontBold
TextAlign = d2TextAlignNear
VertTextAlign = d2TextAlignCenter
Text = 'AI 名称'
end
object edtAIName: TD2TextBox
Align = vaClient
Position.Point = '(196,8)'
Width = 664
Height = 64
Padding.Rect = '(8,8,8,8)'
TabOrder = 1
Font.Family = 'Microsoft Yahei'
Font.Size = 24
ReadOnly = False
Password = False
Text = '我制作的游戏王残局'
end
end
end end
end end
end end
...@@ -18,6 +18,7 @@ type ...@@ -18,6 +18,7 @@ type
Label2: TD2Label; Label2: TD2Label;
Label3: TD2Label; Label3: TD2Label;
Label4: TD2Label; Label4: TD2Label;
Label5: TD2Label;
Layout1: TD2Layout; Layout1: TD2Layout;
Layout2: TD2Layout; Layout2: TD2Layout;
Layout3: TD2Layout; Layout3: TD2Layout;
...@@ -25,15 +26,19 @@ type ...@@ -25,15 +26,19 @@ type
Layout5: TD2Layout; Layout5: TD2Layout;
edtSelfLP: TD2NumberBox; edtSelfLP: TD2NumberBox;
edtOpponentLP: TD2NumberBox; edtOpponentLP: TD2NumberBox;
Layout6: TD2Layout;
mmMessage: TD2Memo; mmMessage: TD2Memo;
mmSolution: TD2Memo; mmSolution: TD2Memo;
Root: TD2Background; Root: TD2Background;
Scene: TD2Scene; Scene: TD2Scene;
edtAIName: TD2TextBox;
private private
function GetAIName: string;
function GetP0LP: Integer; function GetP0LP: Integer;
function GetP1LP: Integer; function GetP1LP: Integer;
function GetPMessage: string; function GetPMessage: string;
function GetPSolution: string; function GetPSolution: string;
procedure SetAIName(AValue: string);
procedure SetP0LP(AValue: Integer); procedure SetP0LP(AValue: Integer);
procedure SetP1LP(AValue: Integer); procedure SetP1LP(AValue: Integer);
procedure SetPMessage(AValue: string); procedure SetPMessage(AValue: string);
...@@ -42,6 +47,7 @@ type ...@@ -42,6 +47,7 @@ type
public public
published published
property PAIName: string read GetAIName write SetAIName;
property P0LP: Integer read GetP0LP write SetP0LP; property P0LP: Integer read GetP0LP write SetP0LP;
property P1LP: Integer read GetP1LP write SetP1LP; property P1LP: Integer read GetP1LP write SetP1LP;
property PMessage: string read GetPMessage write SetPMessage; property PMessage: string read GetPMessage write SetPMessage;
...@@ -57,6 +63,11 @@ implementation ...@@ -57,6 +63,11 @@ implementation
{ TFormPuzzleConfig } { TFormPuzzleConfig }
function TFormPuzzleConfig.GetAIName: string;
begin
Exit(edtAIName.Text);
end;
function TFormPuzzleConfig.GetP0LP: Integer; function TFormPuzzleConfig.GetP0LP: Integer;
begin begin
Exit(Trunc(edtSelfLP.Value)); Exit(Trunc(edtSelfLP.Value));
...@@ -77,6 +88,11 @@ begin ...@@ -77,6 +88,11 @@ begin
Exit(mmSolution.Lines.Text); Exit(mmSolution.Lines.Text);
end; end;
procedure TFormPuzzleConfig.SetAIName(AValue: string);
begin
edtAIName.Text:= AValue;
end;
procedure TFormPuzzleConfig.SetP0LP(AValue: Integer); procedure TFormPuzzleConfig.SetP0LP(AValue: Integer);
begin begin
edtSelfLP.Value:= AValue; edtSelfLP.Value:= AValue;
......
...@@ -10,7 +10,6 @@ object FormSearchCard: TFormSearchCard ...@@ -10,7 +10,6 @@ object FormSearchCard: TFormSearchCard
ClientWidth = 900 ClientWidth = 900
DesignTimePPI = 192 DesignTimePPI = 192
Position = poMainFormCenter Position = poMainFormCenter
LCLVersion = '3.6.0.0'
object Scene: TD2Scene object Scene: TD2Scene
Left = 0 Left = 0
Height = 1200 Height = 1200
...@@ -44,20 +43,19 @@ object FormSearchCard: TFormSearchCard ...@@ -44,20 +43,19 @@ object FormSearchCard: TFormSearchCard
end end
object edtCardName: TD2TextBoxClearBtn object edtCardName: TD2TextBoxClearBtn
Align = vaLeft Align = vaLeft
Position.Point = '(136,16)' Position.Point = '(128,8)'
Width = 362 Width = 450
Height = 48 Height = 64
Padding.Rect = '(16,16,16,16)' Padding.Rect = '(8,8,8,8)'
TabOrder = 1 TabOrder = 1
Font.Family = 'microsoft yahei' Font.Family = 'microsoft yahei'
Font.Size = 28 Font.Size = 28
ReadOnly = False ReadOnly = False
Password = False Password = False
Text = '魔术师'
end end
object btnSearchCard: TD2CornerButton object btnSearchCard: TD2CornerButton
Align = vaLeft Align = vaLeft
Position.Point = '(522,8)' Position.Point = '(594,8)'
Width = 120 Width = 120
Height = 64 Height = 64
Padding.Rect = '(8,8,8,8)' Padding.Rect = '(8,8,8,8)'
......
...@@ -107,34 +107,34 @@ initialization ...@@ -107,34 +107,34 @@ initialization
end; end;
FILES_DIR := WORK_DIR + 'files' + SPL; FILES_DIR := WORK_DIR + 'files' + SPL;
if (not DirectoryExists(FILES_DIR)) then begin if (not DirectoryExists(FILES_DIR)) then begin
ForceDirectories(FILES_DIR); // ForceDirectories(FILES_DIR);
end; end;
MimeTypesFile:= FILES_DIR + 'mime.txt'; MimeTypesFile:= FILES_DIR + 'mime.txt';
RegisterFileLocation('static', {$IFDEF WINDOWS}'files'{$ELSE}FILES_DIR{$ENDIF}); // RegisterFileLocation('static', {$IFDEF WINDOWS}'files'{$ELSE}FILES_DIR{$ENDIF});
// create tmp folder // create tmp folder
TMP_DIR:= WORK_DIR + 'tmp' + SPL; TMP_DIR:= WORK_DIR + 'tmp' + SPL;
if (not DirectoryExists(TMP_DIR)) then begin if (not DirectoryExists(TMP_DIR)) then begin
ForceDirectories(TMP_DIR); // ForceDirectories(TMP_DIR);
end; end;
LOG_DIR := WORK_DIR + 'logs' + SPL; LOG_DIR := WORK_DIR + 'logs' + SPL;
if (not DirectoryExists(LOG_DIR)) then begin if (not DirectoryExists(LOG_DIR)) then begin
ForceDirectories(LOG_DIR); // ForceDirectories(LOG_DIR);
end; end;
LD_DIR:= WORK_DIR + 'ld' + SPL; LD_DIR:= WORK_DIR + 'ld' + SPL;
if (not DirectoryExists(LD_DIR)) then begin if (not DirectoryExists(LD_DIR)) then begin
ForceDirectories(LD_DIR); // ForceDirectories(LD_DIR);
end; end;
CONFIG_DIR:= WORK_DIR + 'config' + SPL; CONFIG_DIR:= WORK_DIR + 'config' + SPL;
if (not DirectoryExists(CONFIG_DIR)) then begin if (not DirectoryExists(CONFIG_DIR)) then begin
ForceDirectories(CONFIG_DIR); // ForceDirectories(CONFIG_DIR);
end; end;
DATA_DIR:= WORK_DIR + 'data' + SPL; DATA_DIR:= WORK_DIR + 'data' + SPL;
if (not DirectoryExists(DATA_DIR)) then begin if (not DirectoryExists(DATA_DIR)) then begin
ForceDirectories(DATA_DIR); // ForceDirectories(DATA_DIR);
end; end;
end. end.
......
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