Initial support for item use scripts in angelscript.
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
@@ -8,7 +8,7 @@ static std::unordered_map<const char*, const char*> _scripts =
|
||||
std::unordered_map<const char*, const char*>{{"testScript1", R"(
|
||||
namespace Pokemon{
|
||||
[Pokemon effect=testScript1]
|
||||
class testScript1 {
|
||||
class testScript1 : PkmnScript {
|
||||
bool testSpecies(Pokemon@ p, const Species@ species){ return p.Species is species; }
|
||||
bool testForme(Pokemon@ p, const Forme@ forme){ return p.Forme is forme; }
|
||||
bool testLevel(Pokemon@ p, uint8 level){ return p.Level == level; }
|
||||
|
||||
@@ -7,7 +7,7 @@ static std::unordered_map<const char*, const char*> _scripts =
|
||||
std::unordered_map<const char*, const char*>{{"testScript1", R"(
|
||||
namespace Pokemon{
|
||||
[Pokemon effect=testScript1]
|
||||
class testScript1 {
|
||||
class testScript1 : PkmnScript {
|
||||
bool testName(const Forme@ s, const constString &in name){ return s.Name == name; }
|
||||
bool testWeight(const Forme@ s, float weight){ return s.Weight == weight; }
|
||||
bool testHeight(const Forme@ s, float height){ return s.Height == height; }
|
||||
|
||||
@@ -7,7 +7,7 @@ static std::unordered_map<const char*, const char*> _scripts =
|
||||
std::unordered_map<const char*, const char*>{{"testScript1", R"(
|
||||
namespace Pokemon{
|
||||
[Pokemon effect=testScript1]
|
||||
class testScript1 {
|
||||
class testScript1 : PkmnScript {
|
||||
bool testName(const Item@ i, const constString &in name){ return i.Name == name; }
|
||||
bool testCategory(const Item@ i, ItemCategory category){ return i.Category == category; }
|
||||
bool testBattleCategory(const Item@ i, BattleItemCategory category){ return i.BattleCategory == category; }
|
||||
|
||||
@@ -7,7 +7,7 @@ static std::unordered_map<const char*, const char*> _scripts =
|
||||
std::unordered_map<const char*, const char*>{{"testScript1", R"(
|
||||
namespace Pokemon{
|
||||
[Pokemon effect=testScript1]
|
||||
class testScript1 {
|
||||
class testScript1 : PkmnScript {
|
||||
bool testName(const MoveData@ s, const constString &in name){ return s.Name == name; }
|
||||
bool testType(const MoveData@ s, uint8 type){ return s.Type == type; }
|
||||
bool testCategory(const MoveData@ s, MoveCategory category){ return s.Category == category; }
|
||||
|
||||
@@ -7,7 +7,7 @@ static std::unordered_map<const char*, const char*> _scripts =
|
||||
std::unordered_map<const char*, const char*>{{"testScript1", R"(
|
||||
namespace Pokemon{
|
||||
[Pokemon effect=testScript1]
|
||||
class testScript1 {
|
||||
class testScript1 : PkmnScript {
|
||||
bool testName(const Species@ s, const constString &in name){ return s.Name == name; }
|
||||
bool testId(const Species@ s, uint16 id){ return s.Id == id; }
|
||||
bool testGenderRate(const Species@ s, float rate){ return s.GenderRate == rate; }
|
||||
|
||||
@@ -7,7 +7,7 @@ static std::unordered_map<const char*, const char*> _scripts =
|
||||
std::unordered_map<const char*, const char*>{{"testScript1", R"(
|
||||
namespace Pokemon{
|
||||
[Pokemon effect=testScript1]
|
||||
class testScript1 {
|
||||
class testScript1 : PkmnScript {
|
||||
bool testMaximumLevel(const StaticLibrary@ s, uint8 level){ return s.Settings.MaximalLevel == level; }
|
||||
bool testMaximumMoves(const StaticLibrary@ s, uint8 moveCount){ return s.Settings.MaximalMoves == moveCount; }
|
||||
bool testSpeciesLibrary(const StaticLibrary@ s, const SpeciesLibrary@ speciesLib){ return s.SpeciesLibrary is speciesLib; }
|
||||
|
||||
Reference in New Issue
Block a user