Skip to content

Commit

Permalink
Merge pull request #1 from SCHREDDO/releases/1.0.0
Browse files Browse the repository at this point in the history
Update Project to v0.2.0-alpha
  • Loading branch information
SCHREDDO authored Mar 23, 2019
2 parents 2054121 + 1962fb4 commit f60ba0c
Show file tree
Hide file tree
Showing 10 changed files with 357 additions and 145 deletions.
23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
## Changelog
### = 0.2.0-alpha March 23rd 2019 =
#### Changed
- expand the damage calculation by dot (damage over time) ticks
- expand the damage calculation by critique hits
### = 0.1.0-alpha March 18th 2019 =
#### Added
- damage calculation on the base of the immediate damage
- new base command goto
- new base command back
- new base command clear
- new base command info
- new base command help
- new base command bye
- new damage (path: dmg) command create
- new damage (path: dmg) command list
- new damage (path: dmg) command show
- new damage (path: dmg) command copy
- new settings (path: settings) command show
- new settings (path: settings) command edit
- new settings (path: settings) command save
- new settings (path: settings) command undo
- new base settings log
104 changes: 104 additions & 0 deletions COMMANDS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
# Commands

| Name | Description | Path |
|------|-------------|------|
|[goto](https://github.com/SCHREDDO/NerdyAion-Aion-Tool-Manager/blob/master/COMMANDS.md#command-goto)|go to path x||
|[back](https://github.com/SCHREDDO/NerdyAion-Aion-Tool-Manager/blob/master/COMMANDS.md#command-back)|go back to main path||
|[clear](https://github.com/SCHREDDO/NerdyAion-Aion-Tool-Manager/blob/master/COMMANDS.md#command-clear)|cleared the console||
|[info](https://github.com/SCHREDDO/NerdyAion-Aion-Tool-Manager/blob/master/COMMANDS.md#command-info)|informations about NerdyAion||
|[help](https://github.com/SCHREDDO/NerdyAion-Aion-Tool-Manager/blob/master/COMMANDS.md#command-help)|shows commands and paths||
|[bye](https://github.com/SCHREDDO/NerdyAion-Aion-Tool-Manager/blob/master/COMMANDS.md#command-bye)|close NerdyAion||
|[create](https://github.com/SCHREDDO/NerdyAion-Aion-Tool-Manager/blob/master/COMMANDS.md#command-create)|create a dmg chatlog pointer|dmg|
|[show](https://github.com/SCHREDDO/NerdyAion-Aion-Tool-Manager/blob/master/COMMANDS.md#command-show)|shows dmg informations from pointer x|dmg|
|[copy](https://github.com/SCHREDDO/NerdyAion-Aion-Tool-Manager/blob/master/COMMANDS.md#command-copy)|copy dmg informations from pointer x|dmg|
|[show](https://github.com/SCHREDDO/NerdyAion-Aion-Tool-Manager/blob/master/COMMANDS.md#command-show)|list of settings|settings|
|[edit](https://github.com/SCHREDDO/NerdyAion-Aion-Tool-Manager/blob/master/COMMANDS.md#command-edit)|edit a setting|settings|
|[save](https://github.com/SCHREDDO/NerdyAion-Aion-Tool-Manager/blob/master/COMMANDS.md#command-save)|saved changes from settings|settings|
|[undo](https://github.com/SCHREDDO/NerdyAion-Aion-Tool-Manager/blob/master/COMMANDS.md#command-undo)|reset the last changes|settings|

# Base Commands
## Command "goto"
Sets the activ path to the path `<path>`.
```console
goto <path>
```
Arguments:
- `path` the path
## Command "back"
Sets the activ path to the main path
```console
back
```
## Command "clear"
Cleared the console.
```console
clear
```
## Command "info"
Shows informations about NerdyAvion
```console
info
```
## Command "help"
Shows a list of commands and paths or informations about a the `<command>`.
```console
help [command]
```
Arguments:
- `command` the command
## Command "bye"
Closes NerdyAion.
```console
bye
```
# Damage (Path: dmg) Commands
## Command "create"
Create a pointer (start point) for the analyzing with the given name `<pointer name>`.
```console
create <pointer name>
```
Arguments:
- `pointer name` the pointer name
## Command "list"
Shows all pointer.
```console
list
```
## Command "show"
Shows dmg informations from pointer `<pointer name>`.
```console
show <pointer name>
```
Arguments:
- `pointer name` the pointer name
## Command "copy"
Cpy the dmg informations from pointer `<pointer name>`.
```console
copy <pointer name>
```
Arguments:
- `pointer name` the pointer name
# Settings (Path: settings) Commands
## Command "show"
Shows all settings an values.
```console
show
```
## Command "edit"
Edit the `<setting>` with the new value `<value>`.
```console
edit <setting> <value>
```
Arguments:
- `setting` which setting is to be changed
- `value` what value the setting should be set to
## Command "save"
Saved changes from settings.
```console
save
```
## Command "undo"
Reset the last changes from settings.
```console
undo
```
54 changes: 46 additions & 8 deletions NerdyAion/NerdyAion/AnalysisTemplate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
//
// Created By: Sebastian Lühnen
// Created On: 19.02.2019
// Last Edited On: 18.03.2019
// Last Edited On: 23.03.2019
// Language: C#
//
using System;
Expand All @@ -35,8 +35,10 @@ public class AnalysisTemplate
{
private String strucktor;
private String template;
private String criticalIdentifier;
/*
* Supported variables:
* time
* eventSource
* eventTarget
* eventEffect
Expand All @@ -47,7 +49,9 @@ public class AnalysisTemplate
*/
private Dictionary<String, String> variables;
private Boolean damageEvent;

private Boolean damageOverTime;
private Boolean criticalHit;

public String Strucktor
{
get { return strucktor; }
Expand All @@ -58,6 +62,11 @@ public String Template
get { return template; }
set { template = value; }
}
public String CriticalIdentifier
{
get { return criticalIdentifier; }
set { criticalIdentifier = value; }
}
public Dictionary<String, String> Variables
{
get { return variables; }
Expand All @@ -68,41 +77,59 @@ public Boolean DamageEvent
get { return damageEvent; }
set { damageEvent = value; }
}
public Boolean DamageOverTime
{
get { return damageOverTime; }
set { damageOverTime = value; }
}
public Boolean CriticalHit
{
get { return criticalHit; }
set { criticalHit = value; }
}

public AnalysisTemplate()
{
Strucktor = "";
Template = "";
CriticalIdentifier = "";
Variables = new Dictionary<string, string>();
DamageEvent = false;
DamageOverTime = false;
CriticalHit = false;
}

public void AddVariable(String variable)
{
Variables.Add(variable, variable);
}

public String GetTime(Match result)
{
return CheckForCriticalHit(result.Groups[Variables["time"]].Value);
}

public String GetEventSource(Match result)
{
return result.Groups[Variables["eventSource"]].Value;
return CheckForCriticalHit(result.Groups[Variables["eventSource"]].Value);
}

public String GetEventTarget(Match result)
{
if (Variables.ContainsKey("eventTarget_eventEffect"))
{
return SplitEventTargetAndEventEffect(result)[0];
return CheckForCriticalHit(SplitEventTargetAndEventEffect(result)[0]);
}
return result.Groups[Variables["eventTarget"]].Value;
return CheckForCriticalHit(result.Groups[Variables["eventTarget"]].Value);
}

public String GetEventName(Match result)
{
if (Variables.ContainsKey("eventName_eventEffect"))
{
return SplitEventNameAndEventEffect(result)[0];
return CheckForCriticalHit(SplitEventNameAndEventEffect(result)[0]);
}
return result.Groups[Variables["eventName"]].Value;
return CheckForCriticalHit(result.Groups[Variables["eventName"]].Value);
}

public long GetEventEffect(Match result)
Expand All @@ -121,7 +148,7 @@ public long GetEventEffect(Match result)

public String GetEventEffectExtra(Match result)
{
return result.Groups[Variables["eventEffectExtra"]].Value;
return CheckForCriticalHit(result.Groups[Variables["eventEffectExtra"]].Value);
}

private String[] SplitEventTargetAndEventEffect(Match result)
Expand All @@ -139,5 +166,16 @@ private String[] SplitEventNameAndEventEffect(Match result)

return new String[] { match.Groups["eventName"].Value, match.Groups["eventEffect"].Value };
}

private String CheckForCriticalHit(String text)
{
if (text.Contains(CriticalIdentifier))
{
CriticalHit = true;
text = text.Substring((CriticalIdentifier.Length));
}

return text;
}
}
}
Loading

0 comments on commit f60ba0c

Please sign in to comment.