三国杀标准全武将拓展.docx
- 文档编号:24057043
- 上传时间:2023-05-23
- 格式:DOCX
- 页数:57
- 大小:34.08KB
三国杀标准全武将拓展.docx
《三国杀标准全武将拓展.docx》由会员分享,可在线阅读,更多相关《三国杀标准全武将拓展.docx(57页珍藏版)》请在冰豆网上搜索。
三国杀标准全武将拓展
--SANGUOSHAStandardVersionGenerals--
--Design:
YOKA(2011)
--Code:
hypercrossibicdlcodroxiel【群】皇叔William915coldera
--Version:
14.10(AfterChibi14)
--LastUpdate:
Dec5201120:
33UTC+8
module("extensions.YKStdGeneral",package.seeall)
extension=sgs.Package("YKStdGeneral")
--0101刘备
luarende_card=sgs.CreateSkillCard
{--仁德技能卡byroxiel,ibicdlcod修复各种BUG(几乎所有技能皆有参考原CPP代码,不再赘述)
name="luarende",
target_fixed=true,--其实这里可以不用FIX掉,不过这样也简单先选牌再选人
will_throw=false,--不扔
once=false,
on_use=function(self,room,source,targets)
source:
gainMark("luarendecount",self:
subcardsLength())
localt=room:
askForPlayerChosen(source,room:
getOtherPlayers(source),"luarende")
room:
playSkillEffect("luarende",math.random(1,2))
room:
moveCardTo(self,t,sgs.Player_Hand,false)
localx=source:
getMark("luarendecount")
ifx>=2andnotsource:
hasFlag("recovered")then--多于两张且没有回复过的标记,就补血然后计数清零
localrecover=sgs.RecoverStruct()--回复结构体
recover.recover=1--回复点数
recover.who=source--回复来源
room:
recover(source,recover)
ifsource:
isKongcheng()then
room:
setPlayerFlag(source,"-luarende_canuse")--空城就禁用技能
end
returntrue
end
end,
}
luarendevs=sgs.CreateViewAsSkill
{--仁德视为技byroxiel
name="luarendevs",
n=999,
view_filter=function(self,selected,to_select)
ifto_select:
isEquipped()thenreturnfalseend--装备不可以使用
returntrue
end,
view_as=function(self,cards)
if#cards==0thenreturnend
localacard=luarende_card:
clone()
forvar=1,#cards,1do--将所有选中的牌加入仁德技能牌的Subcards
acard:
addSubcard(cards[var])
end
acard:
setSkillName(self:
objectName())
returnacard
end,
enabled_at_play=function()
returnsgs.Self:
hasFlag("luarende_canuse")
end,
}
luarende=sgs.CreateTriggerSkill
{--仁德byroxiel
name="luarende",
view_as_skill=luarendevs,
events={sgs.PhaseChange},
on_trigger=function(self,event,player,data)
localroom=player:
getRoom()
ifplayer:
getPhase()==sgs.Player_Playthen
room:
setPlayerFlag(player,"luarende_canuse")--回合开始让VIEWAS可以使用
elseifplayer:
getPhase()==sgs.Player_Finishthen
room:
setPlayerFlag(player,"-luarende_canuse")--回合结束让VIEWAS禁用
room:
setPlayerMark(player,"luarendecount",0)--计数清零
end
end
end,
}
--0102关羽
luawusheng=sgs.CreateViewAsSkill
{--武圣by【群】皇叔
name="luawusheng",
n=1,
view_filter=function(self,selected,to_select)
returnto_select:
isRed()
end,
view_as=function(self,cards)
if#cards==0thenreturnnilend
if#cards==1then
localcard=cards[1]
localacard=sgs.Sanguosha:
cloneCard("slash",card:
getSuit(),card:
getNumber())
acard:
addSubcard(card:
getId())
acard:
setSkillName(self:
objectName())
returnacard
end
end,
enabled_at_play=function()
return(sgs.Self:
canSlashWithoutCrossbow())or(sgs.Self:
getWeapon()andsgs.Self:
getWeapon():
className()=="Crossbow")
end,
enabled_at_response=function(self,player,pattern)
returnpattern=="slash"
end,
}
--0103张飞(lua不能)
--0104诸葛亮
luaguanxing=sgs.CreateTriggerSkill
{--观星by【群】皇叔
name="luaguanxing",
frequency=sgs.Skill_Frequent,
events={sgs.PhaseChange},
on_trigger=function(self,event,player,data)
localroom=player:
getRoom()
if(player:
getPhase()==sgs.Player_Start)then
if(notroom:
askForSkillInvoke(player,self:
objectName()))thenreturnfalseend
localx=room:
alivePlayerCount()
ifx>5then
x=5
end
room:
doGuanxing(player,room:
getNCards(x),false)
end
end,
--[[
警告:
一切没有lua化而有(to:
hasSkill("kongcheng"))and(to:
isKongcheng())的内核技能都会出现无视lua空城的BUG!
已知的有:
Player:
:
CanSlashplayer.cpp593
函数涉及姜维挑衅mountainpackage.cpp576
大乔流离standard-skillcards.cpp254
刘备激将standard-skillcards.cpp273
贾诩乱武thicket.cpp662
【倚】夏侯涓连理【杀】yitian-package.cpp492
【倚】邓艾偷渡yitian-package.cpp1565
【将】凌统旋风yjcm-package.cpp440
【将】高顺陷阵yjcm-package.cpp533
【将】陈宫明策yjcm-package.cpp650
貂蝉离间standard-skillcards.cpp173
夏侯渊神速wind.cpp243
【智】姜维异才wisdompackage.cpp199
【智】孙策霸王wisdompackage.cpp300
红颜百合百合离间hongyanscenario.cpp60
]]
}
luakongcheng=sgs.CreateProhibitSkill
{--空城by【群】皇叔
name="luakongcheng",
is_prohibited=function(self,from,to,card)
if(to:
hasSkill("luakongcheng"))and(to:
isKongcheng())then
returncard:
inherits("Slash")orcard:
inherits("Duel")
end
end,
}
--0105赵云
ldtmp={}
lualongdan=sgs.CreateViewAsSkill
{--龙胆by【群】皇叔
name="lualongdan",
n=1,
view_filter=function(self,selected,to_select)
return(to_select:
inherits("Slash"))or(to_select:
inherits("Jink"))
end,
view_as=function(self,cards)
if#cards==1then
localcard=cards[1]
localld_card=sgs.Sanguosha:
cloneCard(ldtmp[1],cards[1]:
getSuit(),cards[1]:
getNumber())
ld_card:
addSubcard(cards[1])
ld_card:
setSkillName(self:
objectName())
returnld_card
end
end,
enabled_at_play=function()
ldtmp[1]="slash"
return(sgs.Self:
canSlashWithoutCrossbow())or(sgs.Self:
getWeapon()andsgs.Self:
getWeapon():
className()=="Crossbow")
end,
enabled_at_response=function(self,player,pattern)
if(pattern=="jink")or(pattern=="slash")then
ldtmp[1]=pattern
returntrue
end
end,
}
--0106马超
luatieqi=sgs.CreateTriggerSkill
{--铁骑by【群】皇叔
name="luatieqi",
frequency=sgs.Skill_Frequency,
events={sgs.SlashProceed},
on_trigger=function(self,event,player,data)
localroom=player:
getRoom()
ifevent==sgs.SlashProceedthen
if(notroom:
askForSkillInvoke(player,self:
objectName()))thenreturnfalseend
localjudge=sgs.JudgeStruct()
judge.pattern=sgs.QRegExp("(.*):
(heart|diamond):
(.*)")
judge.good=true
judge.reason=self:
objectName()
judge.who=player
room:
judge(judge)
if(judge:
isGood())then
localeffect=data:
toSlashEffect()
room:
slashResult(effect,nil)
returntrue
end
end
end
}
luamashu=sgs.CreateDistanceSkill
{--马术by【群】皇叔
name="luamashu",
correct_func=function(self,from,to)
iffrom:
hasSkill("luamashu")then
return-1
end
end,
}
--0107黄月英(奇才确认lua不能)
luajizhi=sgs.CreateTriggerSkill
{--集智by【群】皇叔
name="luajizhi",
events={sgs.CardUsed},
frequency=sgs.Skill_Frequent,
on_trigger=function(self,event,player,data)
localroom=player:
getRoom()
localcard=data:
toCardUse().card
ifcard:
isNDTrick()then
ifnotroom:
askForSkillInvoke(player,"luajizhi")thenreturnfalseend
player:
drawCards
(1)
end
end,
}
--0101
lualiubei=sgs.General(extension,"lualiubei$","shu",4)
lualiubei:
addSkill(luarende)
--0102
luaguanyu=sgs.General(extension,"luaguanyu","shu",4)
luaguanyu:
addSkill(luawusheng)
--0103
luazhangfei=sgs.General(extension,"luazhangfei","shu",4)
luazhangfei:
addSkill("paoxiao")
--0104
luazhugeliang=sgs.General(extension,"luazhugeliang","shu",4)
luazhugeliang:
addSkill(luaguanxing)
luazhugeliang:
addSkill(luakongcheng)
--0105
luazhaoyun=sgs.General(extension,"luazhaoyun","shu",4)
luazhaoyun:
addSkill(lualongdan)
--0106
luamachao=sgs.General(extension,"luamachao","shu",4)
luamachao:
addSkill(luatieqi)
luamachao:
addSkill(luamashu)
--0107
luahuangyueying=sgs.General(extension,"luahuangyueying","shu",3,false)
luahuangyueying:
addSkill(luajizhi)
luahuangyueying:
addSkill("qicai")
--0201曹操
luajianxiong=sgs.CreateTriggerSkill
{--奸雄byhypercross
frequency=sgs.Skill_NotFrequent,
name="luajianxiong",
events={sgs.Damaged},
on_trigger=function(self,event,player,data)
localroom=player:
getRoom()
localcard=data:
toDamage().card
ifnotroom:
obtainable(card,player)thenreturnend
ifroom:
askForSkillInvoke(player,"luajianxiong")then
room:
playSkillEffect("luajianxiong")
player:
obtainCard(card)
end
end
}
luahujia=sgs.CreateTriggerSkill
{--护驾byibicdlcod
name="luahujia$",
default_choice="ignore",
events={sgs.CardAsked,sgs.Damaged},
on_trigger=function(self,event,player,data)
localroom=player:
getRoom()
if(notplayer:
hasLordSkill("luahujia"))thenreturnfalseend
if(data:
toString()~="jink")thenreturnfalseend
if(notroom:
askForSkillInvoke(player,"luahujia"))thenreturnfalseend
room:
playSkillEffect("luahujia")
for_,liegeinsgs.qlist(room:
getOtherPlayers(player))do
localdata=sgs.QVariant(0)
localjink=0
if(liege:
getKingdom()~="wei")thenreturnfalseend
data:
setValue(player)
jink=room:
askForCard(liege,"jink","@hujia-jink",data)
if(jink)then
room:
provide(jink)
returntrue
end
end
returnfalse
end
--事实上,Masochism此类多余,并且似乎有问题,而且带感情色彩,建议不用
}
--0202司马懿
luafankui=sgs.CreateTriggerSkill
{--反馈byibicdlcod
frequency=sgs.Skill_NotFrequent,
name="luafankui",
events={sgs.Damaged},
on_trigger=function(self,event,player,data)
localroom=player:
getRoom()
localfrom=data:
toDamage().from
localdata=sgs.QVariant(0)
data:
setValue(from)
if(fromand(notfrom:
isNude())androom:
askForSkillInvoke(player,"luafankui",data))then
localcard_id=room:
askForCardChosen(player,from,"he","luafankui")
if(room:
getCardPlace(card_id)==sgs.Player_Hand)then
room:
moveCardTo(sgs.Sanguosha:
getCard(card_id),player,sgs.Player_Hand,false)
else
room:
obtainCard(player,card_id)
end
room:
playSkillEffect("luafankui")
end
end
}
luaguicai_card=sgs.CreateSkillCard
{--鬼才技能卡byroxiel
name="luaguicai_effect",
target_fixed=true,
will_throw=false,
}
luaguicaivs=sgs.CreateViewAsSkill
{--鬼才Viewasbyroxiel
name="luaguicaivs",
n=1,
view_filter=function(self,selected,to_select)
ifnotto_select:
isEquipped()thenreturntrue
elsereturnfalseend
end,
view_as=function(self,cards)
if#cards==1then
localacard=luaguicai_card:
clone()
acard:
addSubcard(cards[1])
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 三国 标准 武将 拓展