-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from teshiba/develop
for release v0.1.2
- Loading branch information
Showing
83 changed files
with
2,385 additions
and
3,204 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,21 @@ | ||
using LibAoe2AISharp.Specifications; | ||
using static LibAoe2AISharp.Framework.AgeStateCollection; | ||
|
||
namespace LibAoe2AISharp.Framework | ||
{ | ||
/// <summary> | ||
/// Basic control after reserching the age. | ||
/// </summary> | ||
public abstract class EnterAge : defrule | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the <see cref="EnterAge"/> class. | ||
/// </summary> | ||
protected EnterAge() | ||
{ | ||
Actions.Add( | ||
new set_goal(AgeState, Transitioned), | ||
new disable_self()); | ||
} | ||
} | ||
using LibAoe2AISharp.Specifications; | ||
using static LibAoe2AISharp.Framework.AgeStateCollection; | ||
|
||
namespace LibAoe2AISharp.Framework | ||
{ | ||
/// <summary> | ||
/// Basic control after reserching the age. | ||
/// </summary> | ||
public abstract class EnterAge : defrule | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the <see cref="EnterAge"/> class. | ||
/// </summary> | ||
protected EnterAge() | ||
{ | ||
Actions.Add( | ||
new set_goal(AgeState, Transitioned), | ||
new disable_self()); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,42 @@ | ||
namespace LibAoe2AISharp.Framework | ||
{ | ||
/// <summary> | ||
/// research state. | ||
/// </summary> | ||
public enum ResearchState | ||
{ | ||
/// <summary> | ||
/// Research finished. | ||
/// </summary> | ||
Finished, | ||
|
||
/// <summary> | ||
/// Researching. | ||
/// </summary> | ||
Researching, | ||
|
||
/// <summary> | ||
/// Not researching now. | ||
/// </summary> | ||
NotResearching, | ||
} | ||
|
||
/// <summary> | ||
/// valid wall perimeter. | ||
/// <para> | ||
/// 1 is closer to the Town Center than 2. | ||
/// </para> | ||
/// </summary> | ||
public enum Perimeter | ||
{ | ||
/// <summary> | ||
/// Perimeter 1 is usually between 10 and 20 tiles from the starting Town Center. | ||
/// </summary> | ||
Near = 1, | ||
|
||
/// <summary> | ||
/// Perimeter 2 is usually between 18 and 30 tiles from the starting Town Center. | ||
/// </summary> | ||
Far = 2, | ||
} | ||
namespace LibAoe2AISharp.Framework | ||
{ | ||
/// <summary> | ||
/// research state. | ||
/// </summary> | ||
public enum ResearchState | ||
{ | ||
/// <summary> | ||
/// Research finished. | ||
/// </summary> | ||
Finished, | ||
|
||
/// <summary> | ||
/// Researching. | ||
/// </summary> | ||
Researching, | ||
|
||
/// <summary> | ||
/// Not researching now. | ||
/// </summary> | ||
NotResearching, | ||
} | ||
|
||
/// <summary> | ||
/// valid wall perimeter. | ||
/// <para> | ||
/// 1 is closer to the Town Center than 2. | ||
/// </para> | ||
/// </summary> | ||
public enum Perimeter | ||
{ | ||
/// <summary> | ||
/// Perimeter 1 is usually between 10 and 20 tiles from the starting Town Center. | ||
/// </summary> | ||
Near = 1, | ||
|
||
/// <summary> | ||
/// Perimeter 2 is usually between 18 and 30 tiles from the starting Town Center. | ||
/// </summary> | ||
Far = 2, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,72 +1,72 @@ | ||
using LibAoe2AISharp.Specifications; | ||
using LibAoe2AISharp.Utilty; | ||
using static LibAoe2AISharp.Specifications.Ope; | ||
|
||
namespace LibAoe2AISharp.Framework | ||
{ | ||
/// <summary> | ||
/// Basic control of research action. | ||
/// Confirm that the unit can be researching and research. | ||
/// </summary> | ||
public class Research : defrule | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the <see cref="Research"/> class. | ||
/// </summary> | ||
/// <param name="researchAge">research age.</param> | ||
public Research(age researchAge) | ||
{ | ||
Comment = "Research " + researchAge.ToLocalLang(); | ||
Facts.Add(new can_research(researchAge)); | ||
Actions.Add(new research(researchAge)); | ||
ResearchAge = researchAge; | ||
ResearchItem = ri.Unknown; | ||
} | ||
|
||
/// <summary> | ||
/// Initializes a new instance of the <see cref="Research"/> class. | ||
/// </summary> | ||
/// <param name="researchItem">research technology.</param> | ||
public Research(ri researchItem) | ||
{ | ||
Comment = "Research " + researchItem.ToLocalLang(); | ||
Facts.Add(new can_research(researchItem)); | ||
Actions.Add(new research(researchItem)); | ||
ResearchItem = researchItem; | ||
ResearchAge = age.Unknown; | ||
} | ||
|
||
/// <summary> | ||
/// Initializes a new instance of the <see cref="Research"/> class. | ||
/// <para> | ||
/// Research item if the given unit is greater than or equal to the given count. | ||
/// </para> | ||
/// </summary> | ||
/// <param name="researchItem">research item.</param> | ||
/// <param name="unit">unit.</param> | ||
/// <param name="count">unit count.</param> | ||
public Research(ri researchItem, unit unit, short count) | ||
{ | ||
Comment = "Research " + researchItem.ToLocalLang() + " :" | ||
+ unit.ToLocalLang() + " up to " + count; | ||
|
||
Facts.Add( | ||
new can_research(researchItem), | ||
new unit_type_count_total(unit, relop.ge, count)); | ||
|
||
Actions.Add(new research(researchItem)); | ||
ResearchItem = researchItem; | ||
ResearchAge = age.Unknown; | ||
} | ||
|
||
/// <summary> | ||
/// Gets research technology. | ||
/// </summary> | ||
public ri ResearchItem { get; } = ri.Unknown; | ||
|
||
/// <summary> | ||
/// Gets research age. | ||
/// </summary> | ||
public age ResearchAge { get; } = age.Unknown; | ||
} | ||
} | ||
using LibAoe2AISharp.Specifications; | ||
using LibAoe2AISharp.Utilty; | ||
using static LibAoe2AISharp.Specifications.Ope; | ||
|
||
namespace LibAoe2AISharp.Framework | ||
{ | ||
/// <summary> | ||
/// Basic control of research action. | ||
/// Confirm that the unit can be researching and research. | ||
/// </summary> | ||
public class Research : defrule | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the <see cref="Research"/> class. | ||
/// </summary> | ||
/// <param name="researchAge">research age.</param> | ||
public Research(age researchAge) | ||
{ | ||
Comment = "Research " + researchAge.ToLocalLang(); | ||
Facts.Add(new can_research(researchAge)); | ||
Actions.Add(new research(researchAge)); | ||
ResearchAge = researchAge; | ||
ResearchItem = ri.Unknown; | ||
} | ||
|
||
/// <summary> | ||
/// Initializes a new instance of the <see cref="Research"/> class. | ||
/// </summary> | ||
/// <param name="researchItem">research technology.</param> | ||
public Research(ri researchItem) | ||
{ | ||
Comment = "Research " + researchItem.ToLocalLang(); | ||
Facts.Add(new can_research(researchItem)); | ||
Actions.Add(new research(researchItem)); | ||
ResearchItem = researchItem; | ||
ResearchAge = age.Unknown; | ||
} | ||
|
||
/// <summary> | ||
/// Initializes a new instance of the <see cref="Research"/> class. | ||
/// <para> | ||
/// Research item if the given unit is greater than or equal to the given count. | ||
/// </para> | ||
/// </summary> | ||
/// <param name="researchItem">research item.</param> | ||
/// <param name="unit">unit.</param> | ||
/// <param name="count">unit count.</param> | ||
public Research(ri researchItem, unit unit, short count) | ||
{ | ||
Comment = "Research " + researchItem.ToLocalLang() + " :" | ||
+ unit.ToLocalLang() + " up to " + count; | ||
|
||
Facts.Add( | ||
new can_research(researchItem), | ||
new unit_type_count_total(unit, relop.ge, count)); | ||
|
||
Actions.Add(new research(researchItem)); | ||
ResearchItem = researchItem; | ||
ResearchAge = age.Unknown; | ||
} | ||
|
||
/// <summary> | ||
/// Gets research technology. | ||
/// </summary> | ||
public ri ResearchItem { get; } = ri.Unknown; | ||
|
||
/// <summary> | ||
/// Gets research age. | ||
/// </summary> | ||
public age ResearchAge { get; } = age.Unknown; | ||
} | ||
} |
Oops, something went wrong.