wwt
This commit is contained in:
commit
79d3213cc0
|
@ -952,18 +952,18 @@ local function updateIntention(player, to, intention)
|
|||
if player.id == to.id then
|
||||
return
|
||||
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
|
||||
if to.role == "lord" or fk.ai_role[to.id] == "loyalist" then
|
||||
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
|
||||
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
|
||||
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 +
|
||||
intention * 100 / (200 + fk.roleValue[player.id].renegade)
|
||||
intention * (100 - fk.roleValue[player.id].renegade) / 200
|
||||
end
|
||||
local aps = player.room:getAlivePlayers()
|
||||
local function compare_func(a, b)
|
||||
|
@ -995,7 +995,7 @@ local function updateIntention(player, to, intention)
|
|||
else
|
||||
fk.ai_role[ap.id] = "neutral"
|
||||
end
|
||||
end --[[
|
||||
end
|
||||
fk.qWarning(
|
||||
player.general ..
|
||||
" " ..
|
||||
|
@ -1003,7 +1003,7 @@ local function updateIntention(player, to, intention)
|
|||
" " ..
|
||||
fk.ai_role[player.id] ..
|
||||
" rebelValue:" .. fk.roleValue[player.id].rebel .. " renegadeValue:" .. fk.roleValue[player.id].renegade
|
||||
)--]]
|
||||
) --]]
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -114,6 +114,22 @@ fk.ai_dis_card.fire_attack_skill = function(self, min_num, num, include_equip, c
|
|||
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 = {
|
||||
intention = 120, -- 身份值
|
||||
value = 2, -- 卡牌价值
|
||||
|
@ -130,6 +146,28 @@ fk.ai_use_play.supply_shortage = function(self, card)
|
|||
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)
|
||||
local use = self:eventData("UseCard")
|
||||
for _, p in ipairs(TargetGroup:getRealTargets(use.tos)) do
|
||||
|
|
|
@ -62,7 +62,7 @@ fk.ai_card.god_salvation = {
|
|||
end
|
||||
end,
|
||||
value = 1.5,
|
||||
priority = 2
|
||||
priority = 4
|
||||
}
|
||||
fk.ai_card.amazing_grace = {
|
||||
intention = -30,
|
||||
|
@ -272,13 +272,13 @@ end
|
|||
fk.ai_nullification.ex_nihilo = function(self, card, to, from, positive)
|
||||
if positive 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]
|
||||
end
|
||||
end
|
||||
else
|
||||
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]
|
||||
end
|
||||
end
|
||||
|
@ -333,6 +333,35 @@ fk.ai_nullification.god_salvation = function(self, card, to, from, positive)
|
|||
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)
|
||||
self.use_id = card.id
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue