mirror of
https://github.com/Qsgs-Fans/FreeKill.git
synced 2024-11-16 19:58:13 +08:00
heg general maxHp enhance
This commit is contained in:
parent
4e87ad3d11
commit
1df0f762e9
|
@ -263,6 +263,7 @@ GraphicsBox {
|
||||||
item.selectable = hegemony ? isHegPair(selectedItem[0], item)
|
item.selectable = hegemony ? isHegPair(selectedItem[0], item)
|
||||||
: true;
|
: true;
|
||||||
if (hegemony) {
|
if (hegemony) {
|
||||||
|
item.inPosition = 0;
|
||||||
if (selectedItem[0]) {
|
if (selectedItem[0]) {
|
||||||
if (selectedItem[1]) {
|
if (selectedItem[1]) {
|
||||||
if (selectedItem[0] === item) {
|
if (selectedItem[0] === item) {
|
||||||
|
@ -299,6 +300,23 @@ GraphicsBox {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (hegemony) {
|
||||||
|
if (selectedItem[0]) {
|
||||||
|
if (selectedItem[0].mainMaxHp < 0) {
|
||||||
|
selectedItem[0].inPosition = 1;
|
||||||
|
} else if (selectedItem[0].deputyMaxHp < 0) {
|
||||||
|
selectedItem[0].inPosition = -1;
|
||||||
|
}
|
||||||
|
if (selectedItem[1]) {
|
||||||
|
if (selectedItem[1].mainMaxHp < 0) {
|
||||||
|
selectedItem[1].inPosition = -1;
|
||||||
|
} else if (selectedItem[1].deputyMaxHp < 0) {
|
||||||
|
selectedItem[1].inPosition = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for (let i = 0; i < generalList.count; i++) {
|
for (let i = 0; i < generalList.count; i++) {
|
||||||
if (lcall("GetSameGenerals", generalList.get(i).name).length > 0) {
|
if (lcall("GetSameGenerals", generalList.get(i).name).length > 0) {
|
||||||
convertBtn.enabled = true;
|
convertBtn.enabled = true;
|
||||||
|
|
|
@ -22,6 +22,9 @@ CardItem {
|
||||||
property int hp
|
property int hp
|
||||||
property int maxHp
|
property int maxHp
|
||||||
property int shieldNum
|
property int shieldNum
|
||||||
|
property int mainMaxHp
|
||||||
|
property int deputyMaxHp
|
||||||
|
property int inPosition: 0
|
||||||
property string pkgName: ""
|
property string pkgName: ""
|
||||||
property bool detailed: true
|
property bool detailed: true
|
||||||
property alias hasCompanions: companions.visible
|
property alias hasCompanions: companions.visible
|
||||||
|
@ -119,12 +122,15 @@ CardItem {
|
||||||
width: childrenRect.width
|
width: childrenRect.width
|
||||||
height: childrenRect.height
|
height: childrenRect.height
|
||||||
Image {
|
Image {
|
||||||
|
opacity: ((mainMaxHp < 0 || deputyMaxHp < 0) && (index * 2 + 1 === hp) && inPosition !== -1)
|
||||||
|
? (inPosition === 0 ? 0.5 : 0) :1
|
||||||
height: 12; fillMode: Image.PreserveAspectFit
|
height: 12; fillMode: Image.PreserveAspectFit
|
||||||
source: SkinBank.getGeneralCardDir(kingdom) + kingdom + "-magatama-l"
|
source: SkinBank.getGeneralCardDir(kingdom) + kingdom + "-magatama-l"
|
||||||
}
|
}
|
||||||
Image {
|
Image {
|
||||||
x: 4.4
|
x: 4.4
|
||||||
opacity: (index + 1) * 2 <= hp ? 1 : 0
|
opacity: (index + 1) * 2 <= hp ? (((mainMaxHp < 0 || deputyMaxHp < 0) && inPosition !== -1 && ((index + 1) * 2 === hp))
|
||||||
|
? (inPosition === 0 ? 0.5 : 0) : 1) : 0
|
||||||
height: 12; fillMode: Image.PreserveAspectFit
|
height: 12; fillMode: Image.PreserveAspectFit
|
||||||
source: {
|
source: {
|
||||||
const k = subkingdom ? subkingdom : kingdom;
|
const k = subkingdom ? subkingdom : kingdom;
|
||||||
|
@ -227,6 +233,8 @@ CardItem {
|
||||||
hp = data.hp;
|
hp = data.hp;
|
||||||
maxHp = data.maxHp;
|
maxHp = data.maxHp;
|
||||||
shieldNum = data.shield;
|
shieldNum = data.shield;
|
||||||
|
mainMaxHp = data.mainMaxHpAdjustedValue;
|
||||||
|
deputyMaxHp = data.deputyMaxHpAdjustedValue;
|
||||||
|
|
||||||
const splited = name.split("__");
|
const splited = name.split("__");
|
||||||
if (splited.length > 1) {
|
if (splited.length > 1) {
|
||||||
|
|
|
@ -19,6 +19,8 @@ function GetGeneralData(name)
|
||||||
shield = general.shield,
|
shield = general.shield,
|
||||||
hidden = general.hidden,
|
hidden = general.hidden,
|
||||||
total_hidden = general.total_hidden,
|
total_hidden = general.total_hidden,
|
||||||
|
mainMaxHpAdjustedValue = general.mainMaxHpAdjustedValue,
|
||||||
|
deputyMaxHpAdjustedValue = general.deputyMaxHpAdjustedValue,
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -31,6 +33,8 @@ function GetGeneralDetail(name)
|
||||||
kingdom = general.kingdom,
|
kingdom = general.kingdom,
|
||||||
hp = general.hp,
|
hp = general.hp,
|
||||||
maxHp = general.maxHp,
|
maxHp = general.maxHp,
|
||||||
|
mainMaxHp = general.mainMaxHpAdjustedValue,
|
||||||
|
deputyMaxHp = general.deputyMaxHpAdjustedValue,
|
||||||
gender = general.gender,
|
gender = general.gender,
|
||||||
skill = {},
|
skill = {},
|
||||||
related_skill = {},
|
related_skill = {},
|
||||||
|
|
Loading…
Reference in New Issue
Block a user