wwt
This commit is contained in:
commit
3767ab6f8a
|
@ -952,18 +952,18 @@ local function updateIntention(player, to, intention)
|
||||||
if player.id == to.id then
|
if player.id == to.id then
|
||||||
return
|
return
|
||||||
elseif player.role == "lord" then
|
elseif player.role == "lord" then
|
||||||
fk.roleValue[to.id].rebel = fk.roleValue[to.id].rebel + intention * 300 / (300 + fk.roleValue[to.id].rebel)
|
fk.roleValue[to.id].rebel = fk.roleValue[to.id].rebel + intention * (200 - fk.roleValue[to.id].rebel) / 200
|
||||||
else
|
else
|
||||||
if to.role == "lord" or fk.ai_role[to.id] == "loyalist" then
|
if to.role == "lord" or fk.ai_role[to.id] == "loyalist" then
|
||||||
fk.roleValue[player.id].rebel = fk.roleValue[player.id].rebel +
|
fk.roleValue[player.id].rebel = fk.roleValue[player.id].rebel +
|
||||||
intention * 200 / (200 + fk.roleValue[player.id].rebel)
|
intention * (200 - fk.roleValue[player.id].rebel) / 200
|
||||||
elseif fk.ai_role[to.id] == "rebel" then
|
elseif fk.ai_role[to.id] == "rebel" then
|
||||||
fk.roleValue[player.id].rebel = fk.roleValue[player.id].rebel -
|
fk.roleValue[player.id].rebel = fk.roleValue[player.id].rebel -
|
||||||
intention * -200 / (-200 + fk.roleValue[player.id].rebel)
|
intention * (fk.roleValue[player.id].rebel + 200) / 200
|
||||||
end
|
end
|
||||||
if fk.roleValue[player.id].rebel < 0 and intention > 0 or fk.roleValue[player.id].rebel > 0 and intention < 0 then
|
if fk.roleValue[player.id].rebel < 0 and intention > 0 or fk.roleValue[player.id].rebel > 0 and intention < 0 then
|
||||||
fk.roleValue[player.id].renegade = fk.roleValue[player.id].renegade +
|
fk.roleValue[player.id].renegade = fk.roleValue[player.id].renegade +
|
||||||
intention * 100 / (200 + fk.roleValue[player.id].renegade)
|
intention * (100 - fk.roleValue[player.id].renegade) / 200
|
||||||
end
|
end
|
||||||
local aps = player.room:getAlivePlayers()
|
local aps = player.room:getAlivePlayers()
|
||||||
local function compare_func(a, b)
|
local function compare_func(a, b)
|
||||||
|
@ -995,7 +995,7 @@ local function updateIntention(player, to, intention)
|
||||||
else
|
else
|
||||||
fk.ai_role[ap.id] = "neutral"
|
fk.ai_role[ap.id] = "neutral"
|
||||||
end
|
end
|
||||||
end --[[
|
end
|
||||||
fk.qWarning(
|
fk.qWarning(
|
||||||
player.general ..
|
player.general ..
|
||||||
" " ..
|
" " ..
|
||||||
|
@ -1003,7 +1003,7 @@ local function updateIntention(player, to, intention)
|
||||||
" " ..
|
" " ..
|
||||||
fk.ai_role[player.id] ..
|
fk.ai_role[player.id] ..
|
||||||
" rebelValue:" .. fk.roleValue[player.id].rebel .. " renegadeValue:" .. fk.roleValue[player.id].renegade
|
" rebelValue:" .. fk.roleValue[player.id].rebel .. " renegadeValue:" .. fk.roleValue[player.id].renegade
|
||||||
)--]]
|
) --]]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -114,6 +114,22 @@ fk.ai_dis_card.fire_attack_skill = function(self, min_num, num, include_equip, c
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
fk.ai_nullification.fire_attack = function(self, card, to, from, positive)
|
||||||
|
if positive then
|
||||||
|
if self:isFriend(to) and #to:getCardIds("h") > 0 and #from:getCardIds("h") > 0 then
|
||||||
|
if #self.avail_cards > 1 or self:isWeak(to) or to.id == self.player.id then
|
||||||
|
self.use_id = self.avail_cards[1]
|
||||||
|
end
|
||||||
|
end
|
||||||
|
else
|
||||||
|
if self:isEnemie(to) and #to:getCardIds("h") > 0 and #from:getCardIds("h") > 1 then
|
||||||
|
if #self.avail_cards > 1 or self:isWeak(to) then
|
||||||
|
self.use_id = self.avail_cards[1]
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
fk.ai_card.fire_attack = {
|
fk.ai_card.fire_attack = {
|
||||||
intention = 120, -- 身份值
|
intention = 120, -- 身份值
|
||||||
value = 2, -- 卡牌价值
|
value = 2, -- 卡牌价值
|
||||||
|
@ -130,6 +146,28 @@ fk.ai_use_play.supply_shortage = function(self, card)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
fk.ai_nullification.supply_shortage = function(self, card, to, from, positive)
|
||||||
|
if positive then
|
||||||
|
if self:isFriend(to) then
|
||||||
|
if #self.avail_cards > 1 or self:isWeak(to) or to.id == self.player.id then
|
||||||
|
self.use_id = self.avail_cards[1]
|
||||||
|
end
|
||||||
|
end
|
||||||
|
else
|
||||||
|
if self:isEnemie(to) then
|
||||||
|
if #self.avail_cards > 1 or self:isWeak(to) then
|
||||||
|
self.use_id = self.avail_cards[1]
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
fk.ai_card.supply_shortage = {
|
||||||
|
intention = 130, -- 身份值
|
||||||
|
value = 2, -- 卡牌价值
|
||||||
|
priority = 1 -- 使用优先值
|
||||||
|
}
|
||||||
|
|
||||||
fk.ai_skill_invoke["#fan_skill"] = function(self)
|
fk.ai_skill_invoke["#fan_skill"] = function(self)
|
||||||
local use = self:eventData("UseCard")
|
local use = self:eventData("UseCard")
|
||||||
for _, p in ipairs(TargetGroup:getRealTargets(use.tos)) do
|
for _, p in ipairs(TargetGroup:getRealTargets(use.tos)) do
|
||||||
|
|
|
@ -62,7 +62,7 @@ fk.ai_card.god_salvation = {
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
value = 1.5,
|
value = 1.5,
|
||||||
priority = 2
|
priority = 4
|
||||||
}
|
}
|
||||||
fk.ai_card.amazing_grace = {
|
fk.ai_card.amazing_grace = {
|
||||||
intention = -30,
|
intention = -30,
|
||||||
|
@ -272,13 +272,13 @@ end
|
||||||
fk.ai_nullification.ex_nihilo = function(self, card, to, from, positive)
|
fk.ai_nullification.ex_nihilo = function(self, card, to, from, positive)
|
||||||
if positive then
|
if positive then
|
||||||
if self:isEnemie(to) then
|
if self:isEnemie(to) then
|
||||||
if #self.avail_cards > 1 or self:isWeak(to) or to.id == self.player.id then
|
if #self.avail_cards > 1 or self:isWeak(to) then
|
||||||
self.use_id = self.avail_cards[1]
|
self.use_id = self.avail_cards[1]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
if self:isFriend(to) then
|
if self:isFriend(to) then
|
||||||
if #self.avail_cards > 1 or self:isWeak(to) then
|
if #self.avail_cards > 1 or self:isWeak(to) or to.id == self.player.id then
|
||||||
self.use_id = self.avail_cards[1]
|
self.use_id = self.avail_cards[1]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -333,6 +333,35 @@ fk.ai_nullification.god_salvation = function(self, card, to, from, positive)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
fk.ai_use_play.god_salvation = function(self, card)
|
||||||
|
local can = 0
|
||||||
|
for _, p in ipairs(self.enemies) do
|
||||||
|
if p:isWounded()
|
||||||
|
then
|
||||||
|
can = can - 1
|
||||||
|
if self:isWeak(p)
|
||||||
|
then
|
||||||
|
can = can - 1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
for _, p in ipairs(self.friends) do
|
||||||
|
if p:isWounded()
|
||||||
|
then
|
||||||
|
can = can + 1
|
||||||
|
if self:isWeak(p)
|
||||||
|
then
|
||||||
|
can = can + 1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
self.use_id = can > 0 and card.id
|
||||||
|
end
|
||||||
|
|
||||||
|
fk.ai_use_play.amazing_grace = function(self, card)
|
||||||
|
self.use_id = #self.player:getCardIds("&h") <= self.player.hp and card.id
|
||||||
|
end
|
||||||
|
|
||||||
fk.ai_use_play.ex_nihilo = function(self, card)
|
fk.ai_use_play.ex_nihilo = function(self, card)
|
||||||
self.use_id = card.id
|
self.use_id = card.id
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue