mirror of
https://gitlab.com/YuukiPS/GSServer-CBT.git
synced 2025-10-06 03:46:00 +03:00
melon
This commit is contained in:
@@ -0,0 +1,76 @@
|
||||
local baseClass = require("UAuto/TestCases/Element/ElementBase")
|
||||
local UAutoLuaTestCase = class("WaterComponent", baseClass)
|
||||
local self = UAutoLuaTestCase
|
||||
self.TestFixture = "WaterComponent"
|
||||
self.Category = "元素"
|
||||
self.Description = "元素成分-水"
|
||||
|
||||
self.Element = "Water"
|
||||
self.MonsterArray = self:GetMonsterArrayByElement(self.Element)
|
||||
|
||||
|
||||
self.OrderIndex = 1;
|
||||
self.CheckMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "检查怪物水元素成分",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self:FinishAllNoob())
|
||||
yield_return(self.base:RunGM("goto "..self.GrassPos,true,true))
|
||||
yield_return(self.base:RunGM("KILL MONSTER ALL"))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
self.base:MonsterAI(false)
|
||||
|
||||
for i, monster in pairs(self.MonsterArray) do
|
||||
self.base:CreateMonster(monster["id"])
|
||||
yield_return(self:WaitFoundEntity(monster["keyword"]))
|
||||
yield_return(self.base:CheckElementContain(self.Element, self.foundEntity))
|
||||
yield_return(self.base:RunGM("KILL MONSTER ALL"))
|
||||
end
|
||||
end)
|
||||
}
|
||||
|
||||
-- self.OrderIndex = self.OrderIndex + 1;
|
||||
-- self.CheckAvatar1 = {
|
||||
-- Order = self.OrderIndex,
|
||||
-- Type = CaseType.MonoTest,
|
||||
-- Description = "检查武将水元素成分:绫华释放技能2",
|
||||
-- Action = UAutoCoroutine(function()
|
||||
-- yield_return(self:ChangeAvatar("Ayaka"))
|
||||
-- yield_return(self.base:Skill(2))
|
||||
-- yield_return(self.base:CheckElementContain(self.Element))
|
||||
-- end)
|
||||
-- }
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.CheckAvatar2 = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "检查武将水元素成分:被水史莱姆攻击",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self:ChangeAvatar("Anbo"))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
self.base:MonsterAI(true)
|
||||
|
||||
yield_return(self.base:RunGM("MONSTER "..tostring(self.MonsterArray[1]["id"]).." 1 1"))
|
||||
yield_return(self:WaitFoundEntity(self.MonsterArray[1]["keyword"]))
|
||||
yield_return(self.base:CheckElementContain(self.Element))
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.CheckEnv2Avatar = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "检查武将靠近水",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("KILL MONSTER ALL"))
|
||||
yield_return(self:ChangeAvatar("Ayaka"))
|
||||
yield_return(self.base:RunGM("goto "..self.WaterPos,true,true))
|
||||
yield_return(self.base:MoveToPosition(self.WaterPosVec1))
|
||||
yield_return(self.base:CheckElementContain(self.Element))
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
return self
|
@@ -0,0 +1,72 @@
|
||||
local baseClass = require("UAuto/TestCases/Element/ElementBase")
|
||||
local UAutoLuaTestCase = class("WaterElectricReaction", baseClass)
|
||||
local self = UAutoLuaTestCase
|
||||
self.TestFixture = "WaterElectricReaction"
|
||||
self.Category = "元素"
|
||||
self.Description = "元素反应-水<-电"
|
||||
|
||||
self.Element = "Water"
|
||||
self.CatalystElement = "Electric"
|
||||
|
||||
self.ElementMonster = self:GetOneMonsterByElement(self.Element)
|
||||
self.CatalystMonster = self:GetOneMonsterByElement(self.CatalystElement)
|
||||
|
||||
|
||||
self.OrderIndex = 1;
|
||||
self.CheckEnv = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "水元素环境与电反应",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("goto "..self.WaterPos,true,true))
|
||||
yield_return(self.base:RunGM("KILL MONSTER ALL"))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
|
||||
yield_return(self:ChangeAvatar("Razor"))
|
||||
yield_return(self.base:RunGM("ENERGY INFINITE ON"))
|
||||
yield_return(self.base:Skill(1))
|
||||
yield_return(self.base:CheckWaterEnvReaction(self.CatalystElement))
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.CheckAvatar = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "水元素武将与电反应",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("goto "..self.WaterPos,true,true))
|
||||
yield_return(self:ChangeAvatar("Ayaka"))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
self.base:MonsterAI(true)
|
||||
|
||||
yield_return(self.base:RunGM("MONSTER "..tostring(self.CatalystMonster["id"]).." 1 1"))
|
||||
yield_return(self:WaitFoundEntity(self.CatalystMonster["keyword"]))
|
||||
|
||||
-- yield_return(self.base:RunGM("MONSTER "..tostring(self.ElementMonster["id"]).." 1 1"))
|
||||
-- yield_return(self:WaitFoundEntity(self.ElementMonster["keyword"]))
|
||||
yield_return(self.base:CheckWaterReaction(self.CatalystElement))
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.CheckMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "水元素怪物与电反应",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("KILL MONSTER ALL"))
|
||||
self.base:MonsterAI(false)
|
||||
yield_return(self.base:RunGM("MONSTER "..tostring(self.ElementMonster["id"]).." 1 1"))
|
||||
yield_return(self:WaitFoundEntity(self.ElementMonster["keyword"]))
|
||||
yield_return(self:ChangeAvatar("Razor"))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
yield_return(self.base:MoveToEntity(self.foundEntity, self.FindTimeOut, self.ElementMonster["fatrange"]))
|
||||
yield_return(self.base:Skill(1))
|
||||
yield_return(self.base:CheckWaterReaction(self.CatalystElement, self.foundEntity))
|
||||
yield_return(self.base:RunGM("KILL MONSTER ALL"))
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
return self
|
@@ -0,0 +1,73 @@
|
||||
local baseClass = require("UAuto/TestCases/Element/ElementBase")
|
||||
local UAutoLuaTestCase = class("WaterFireReaction", baseClass)
|
||||
local self = UAutoLuaTestCase
|
||||
self.TestFixture = "WaterFireReaction"
|
||||
self.Category = "元素"
|
||||
self.Description = "元素反应-水<-火"
|
||||
|
||||
self.Element = "Water"
|
||||
self.CatalystElement = "Fire"
|
||||
|
||||
self.ElementMonster = self:GetOneMonsterByElement(self.Element)
|
||||
self.CatalystMonster = self:GetOneMonsterByElement(self.CatalystElement)
|
||||
|
||||
|
||||
self.OrderIndex = 1;
|
||||
self.CheckMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "水元素怪物与火反应",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("goto "..self.GrassPos,true,true))
|
||||
yield_return(self.base:RunGM("KILL MONSTER ALL"))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
self.base:MonsterAI(false)
|
||||
|
||||
yield_return(self.base:RunGM("MONSTER "..tostring(self.ElementMonster["id"]).." 1 1"))
|
||||
yield_return(self:WaitFoundEntity(self.ElementMonster["keyword"]))
|
||||
yield_return(self.base:RunGM("WUDI MONSTER ON"))
|
||||
|
||||
yield_return(self:ChangeAvatar("Anbo"))
|
||||
yield_return(self.base:RunGM("ENERGY INFINITE ON"))
|
||||
yield_return(self.base:MoveToEntity(self.foundEntity, self.FindTimeOut, self.ElementMonster["fatrange"]))
|
||||
yield_return(self.base:Skill(4))
|
||||
yield_return(self.base:CheckWaterReaction(self.CatalystElement, self.foundEntity))
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.CheckAvatar = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "水元素武将与火反应",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("KILL MONSTER ALL"))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
self.base:MonsterAI(true)
|
||||
|
||||
yield_return(self.base:RunGM("MONSTER "..tostring(self.CatalystMonster["id"]).." 1 1"))
|
||||
yield_return(self:WaitFoundEntity(self.CatalystMonster["keyword"]))
|
||||
|
||||
yield_return(self.base:RunGM("MONSTER "..tostring(self.ElementMonster["id"]).." 1 1"))
|
||||
yield_return(self:WaitFoundEntity(self.ElementMonster["keyword"]))
|
||||
|
||||
yield_return(self.base:CheckWaterReaction(self.CatalystElement))
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.CheckEnv = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "水元素环境与火反应",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("goto "..self.WaterPos,true,true))
|
||||
yield_return(self.base:RunGM("KILL MONSTER ALL"))
|
||||
yield_return(self:ChangeAvatar("Anbo"))
|
||||
yield_return(self.base:Skill(4))
|
||||
yield_return(self.base:CheckWaterEnvReaction("Steam"))
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
return self
|
@@ -0,0 +1,66 @@
|
||||
local baseClass = require("UAuto/TestCases/Element/ElementBase")
|
||||
local UAutoLuaTestCase = class("WaterIceReaction", baseClass)
|
||||
local self = UAutoLuaTestCase
|
||||
self.TestFixture = "WaterIceReaction"
|
||||
self.Category = "元素"
|
||||
self.Description = "元素反应-水<-冰"
|
||||
|
||||
self.Element = "Water"
|
||||
self.CatalystElement = "Ice"
|
||||
|
||||
self.ElementMonster = self:GetOneMonsterByElement(self.Element)
|
||||
self.CatalystMonster = self:GetOneMonsterByElement(self.CatalystElement)
|
||||
|
||||
|
||||
self.OrderIndex = 1;
|
||||
self.CheckMonster = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "水元素怪物与冰反应",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("goto "..self.GrassPos,true,true))
|
||||
yield_return(self.base:RunGM("KILL MONSTER ALL"))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
self.base:MonsterAI(false)
|
||||
|
||||
yield_return(self.base:RunGM("MONSTER "..tostring(self.ElementMonster["id"]).." 1 1"))
|
||||
yield_return(self:WaitFoundEntity(self.ElementMonster["keyword"]))
|
||||
yield_return(self.base:RunGM("WUDI MONSTER ON"))
|
||||
|
||||
yield_return(self:ChangeAvatar("Ayaka"))
|
||||
yield_return(self.base:MoveToEntity(self.foundEntity, self.FindTimeOut, self.ElementMonster["fatrange"]))
|
||||
yield_return(self.base:Skill(1))
|
||||
yield_return(self.base:CheckWaterReaction(self.CatalystElement, self.foundEntity))
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.CheckAvatar = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "水元素武将与冰反应",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:RunGM("goto "..self.WaterPos,true,true))
|
||||
yield_return(self.base:RunGM("KILL MONSTER ALL"))
|
||||
yield_return(self.base:RunGM("WUDI ON"))
|
||||
self.base:MonsterAI(true)
|
||||
|
||||
yield_return(self.base:MoveToPosition(self.WaterPosVec1))
|
||||
yield_return(self.base:RunGM("MONSTER "..tostring(self.CatalystMonster["id"]).." 1 1"))
|
||||
yield_return(self:WaitFoundEntity(self.CatalystMonster["keyword"]))
|
||||
yield_return(self.base:CheckWaterReaction(self.CatalystElement))
|
||||
end)
|
||||
}
|
||||
|
||||
self.OrderIndex = self.OrderIndex + 1;
|
||||
self.CheckEnv = {
|
||||
Order = self.OrderIndex,
|
||||
Type = CaseType.MonoTest,
|
||||
Description = "水元素环境与冰反应",
|
||||
Action = UAutoCoroutine(function()
|
||||
yield_return(self.base:CheckWaterEnvReaction(self.CatalystElement))
|
||||
end)
|
||||
}
|
||||
|
||||
|
||||
return self
|
Reference in New Issue
Block a user