Skip to content

Commit

Permalink
Formulas, skills, icons, specialized class assignements and attribute…
Browse files Browse the repository at this point in the history
…s restricted

- Formulas added: added puppeteer formula parser (SequenceFormula),
changed formula to puppeteer "FormulaFork" and added labels to editor
(item and specialized class)
- Skills added: created scripts and editor, added to specializedClass
and to editor menu
- Icon in item: 64x64 max size
- Added specialized classes to Character (and Editor)
- Add atrbiutes of specialized class to character when is assigned
- Show slots defined in specialized class when assigned to Caracter in
editor
- Restricted attributes fields to "value, minValue and maxValue" in
specialized class and character editor
- Added skills button to in-game turn menu
  • Loading branch information
WyrnCael committed Apr 25, 2018
1 parent 1a2fa5f commit 67f4d15
Show file tree
Hide file tree
Showing 69 changed files with 1,341 additions and 633 deletions.
6 changes: 3 additions & 3 deletions Assets/IsoUnity/Source/Sequences/Forks/FormulaFork.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,16 @@ public string Formula
}
}

public SequenceFormula SequenceFormula { get; private set; }
public FormulaParser SequenceFormula { get; private set; }

void Awake()
{
SequenceFormula = new SequenceFormula();
SequenceFormula = new FormulaParser();
}

void OnEnable()
{
SequenceFormula = new SequenceFormula();
SequenceFormula = new FormulaParser();
SequenceFormula.Formula = formula;
}

Expand Down
6 changes: 3 additions & 3 deletions Assets/IsoUnity/Source/Sequences/Formula/FormulaSetter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,16 @@ public string Formula

private string paramError;

public SequenceFormula SequenceFormula { get; private set; }
public FormulaParser SequenceFormula { get; private set; }

void Awake()
{
SequenceFormula = new SequenceFormula();
SequenceFormula = new FormulaParser();
}

void OnEnable()
{
SequenceFormula = new SequenceFormula();
SequenceFormula = new FormulaParser();
SequenceFormula.Formula = formula;
}

Expand Down
6 changes: 3 additions & 3 deletions Assets/IsoUnity/Source/Sequences/Formula/SequenceFormula.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
using System.Reflection;

namespace IsoUnity.Sequences {
public class SequenceFormula {
public class FormulaParser {

private Expression expression;
private string formula;
private string paramError;
private string functionError;
private object expresionResult;

public SequenceFormula() : this(string.Empty) { }
public SequenceFormula(string formula)
public FormulaParser() : this(string.Empty) { }
public FormulaParser(string formula)
{
this.Formula = formula;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,11 +143,11 @@ private string ParseFormulas(string toParse)
try
{
toParse = Regex.Replace(toParse, @"\<\$(.+)\$\>", m => {
var formula = new SequenceFormula(m.Groups[1].Value);
var formula = new FormulaParser(m.Groups[1].Value);
return formula.IsValidExpression ? formula.Evaluate().ToString() : formula.Error;
}, RegexOptions.Multiline);
toParse = Regex.Replace(toParse, @"\$(\w+)", m => {
var formula = new SequenceFormula(m.Groups[1].Value);
var formula = new FormulaParser(m.Groups[1].Value);
return formula.IsValidExpression ? formula.Evaluate().ToString() : formula.Error;
}, RegexOptions.Multiline);

Expand Down
30 changes: 15 additions & 15 deletions Assets/Scenes/test.unity
Original file line number Diff line number Diff line change
Expand Up @@ -6639,10 +6639,10 @@ MonoBehaviour:
secuence: {fileID: 504131946}
position:
serializedVersion: 2
x: 854
y: 133
x: 511
y: 148
width: 300
height: 114
height: 109
collapsed: 0
--- !u!43 &189444603
Mesh:
Expand Down Expand Up @@ -16088,8 +16088,8 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 53999f937d6643b42949d28bcda1a943, type: 3}
m_Name:
m_EditorClassIdentifier:
character: {fileID: 11400000, guid: 36a63a88f336fee4fbee3ca4e3812861, type: 2}
team: {fileID: 11400000, guid: 6997cfd5caffcfe4c874c9f0ac22d59b, type: 2}
character: {fileID: 11400000, guid: 2ce6ded48f42c8e46b99a9a665a8efda, type: 2}
team: {fileID: 11400000, guid: edbd6fc84edad7749b2192b14449f153, type: 2}
--- !u!114 &494325675
MonoBehaviour:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -20933,8 +20933,8 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 53999f937d6643b42949d28bcda1a943, type: 3}
m_Name:
m_EditorClassIdentifier:
character: {fileID: 11400000, guid: 3eca2b4789a5bc44abd112d60d4af688, type: 2}
team: {fileID: 11400000, guid: 6c8f21e3fb66c0346a2b2cc371eb3219, type: 2}
character: {fileID: 11400000, guid: 75942776545ea02418c221a9273f406b, type: 2}
team: {fileID: 11400000, guid: edbd6fc84edad7749b2192b14449f153, type: 2}
--- !u!114 &651502395
MonoBehaviour:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -34782,8 +34782,8 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 53999f937d6643b42949d28bcda1a943, type: 3}
m_Name:
m_EditorClassIdentifier:
character: {fileID: 11400000, guid: 75942776545ea02418c221a9273f406b, type: 2}
team: {fileID: 11400000, guid: 6c8f21e3fb66c0346a2b2cc371eb3219, type: 2}
character: {fileID: 11400000, guid: 496024b31fb8d604ba8b12317f0d4762, type: 2}
team: {fileID: 11400000, guid: edbd6fc84edad7749b2192b14449f153, type: 2}
--- !u!114 &909185162
MonoBehaviour:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -38924,8 +38924,8 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 53999f937d6643b42949d28bcda1a943, type: 3}
m_Name:
m_EditorClassIdentifier:
character: {fileID: 11400000, guid: 47430d8af55fb254dbd2af8d116d196d, type: 2}
team: {fileID: 11400000, guid: 6997cfd5caffcfe4c874c9f0ac22d59b, type: 2}
character: {fileID: 11400000, guid: 36a63a88f336fee4fbee3ca4e3812861, type: 2}
team: {fileID: 11400000, guid: 15bb40f2e1f0dd04a8ec14b3c2bb0cc4, type: 2}
--- !u!114 &1054756145
MonoBehaviour:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -41551,8 +41551,8 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 53999f937d6643b42949d28bcda1a943, type: 3}
m_Name:
m_EditorClassIdentifier:
character: {fileID: 11400000, guid: 2ce6ded48f42c8e46b99a9a665a8efda, type: 2}
team: {fileID: 11400000, guid: 6c8f21e3fb66c0346a2b2cc371eb3219, type: 2}
character: {fileID: 11400000, guid: bac31a58c9f786c4a9d5b67034ba5482, type: 2}
team: {fileID: 11400000, guid: edbd6fc84edad7749b2192b14449f153, type: 2}
--- !u!114 &1140926019
MonoBehaviour:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -56883,8 +56883,8 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 53999f937d6643b42949d28bcda1a943, type: 3}
m_Name:
m_EditorClassIdentifier:
character: {fileID: 11400000, guid: caa5b8cc4b5205b4297289922d3b7e33, type: 2}
team: {fileID: 11400000, guid: 6997cfd5caffcfe4c874c9f0ac22d59b, type: 2}
character: {fileID: 11400000, guid: 47430d8af55fb254dbd2af8d116d196d, type: 2}
team: {fileID: 11400000, guid: 15bb40f2e1f0dd04a8ec14b3c2bb0cc4, type: 2}
--- !u!114 &1573021072
MonoBehaviour:
m_ObjectHideFlags: 0
Expand Down
47 changes: 20 additions & 27 deletions Assets/TRPGMaker/Database/Characters/NewCharacter(1).asset
Original file line number Diff line number Diff line change
Expand Up @@ -18,43 +18,36 @@ MonoBehaviour:
- name: Health
id: HP
description:
maxValue: 250
maxValue: 300
minValue: 300
value: 0
isCore: 0
- name: Move Range
id: MVR
description:
maxValue: 30
minValue: 0
value: 500
value: 5
isCore: 1
- name: Move Height
- name: Move height
id: MVH
description:
maxValue: 2
minValue: 2
value: 2
maxValue: 15
minValue: 0
value: 1
isCore: 1
- name: Attack Range
id: ATR
description:
maxValue: 3
minValue: 3
value: 3
isCore: 1
- name: AttackHeight
id: ATH
description:
maxValue: 2
minValue: 2
value: 2
isCore: 1
- name: Move Range
id: MVR
description:
maxValue: 4
minValue: 4
maxValue: 30
minValue: 0
value: 4
isCore: 1
- name: Agility
id:
- name: Attack Height
id: ATH
description:
maxValue: 100
maxValue: 15
minValue: 0
value: 20
value: 1
isCore: 1
specializedClass: []
specializedClasses: []
60 changes: 0 additions & 60 deletions Assets/TRPGMaker/Database/Characters/NewCharacter(2).asset

This file was deleted.

60 changes: 0 additions & 60 deletions Assets/TRPGMaker/Database/Characters/NewCharacter(3).asset

This file was deleted.

37 changes: 15 additions & 22 deletions Assets/TRPGMaker/Database/Characters/NewCharacter(4).asset
Original file line number Diff line number Diff line change
Expand Up @@ -20,41 +20,34 @@ MonoBehaviour:
description:
maxValue: 300
minValue: 0
value: 250
isCore: 1
value: 300
isCore: 0
- name: Move Range
id: MVR
description:
maxValue: 4
minValue: 4
value: 4
maxValue: 30
minValue: 0
value: 5
isCore: 1
- name: Move Height
- name: Move height
id: MVH
description:
maxValue: 8
maxValue: 15
minValue: 0
value: 8
value: 1
isCore: 1
- name: Attack Range
id: ATR
description:
maxValue: 20
minValue: 3
value: 5
maxValue: 30
minValue: 0
value: 4
isCore: 1
- name: AttackHeight
- name: Attack Height
id: ATH
description:
maxValue: 2
minValue: 2
value: 2
isCore: 1
- name: Agility
id:
description:
maxValue: 100
maxValue: 15
minValue: 0
value: 0
value: 1
isCore: 1
specializedClass: []
specializedClasses: []
Loading

0 comments on commit 67f4d15

Please sign in to comment.