feat: add 100th-season all-star growth event
This commit is contained in:
@@ -10,7 +10,7 @@ import { unwrap } from '@util/unwrap';
|
||||
import { TemplateEngine } from '@util/TemplateEngine';
|
||||
import { Tooltip } from 'bootstrap';
|
||||
import { trim } from 'lodash-es';
|
||||
type CardItem = {
|
||||
type CardItem = {
|
||||
uniqueName: string,
|
||||
|
||||
imgsvr: 0|1,
|
||||
@@ -26,9 +26,14 @@ type CardItem = {
|
||||
specialWarInfo?: string,
|
||||
specialWarText?: string,
|
||||
|
||||
personal?: string,
|
||||
personalText?: string,
|
||||
}
|
||||
personal?: string,
|
||||
personalText?: string,
|
||||
event100Growth?: boolean,
|
||||
leadership?: number,
|
||||
strength?: number,
|
||||
intel?: number,
|
||||
dex?: number[],
|
||||
}
|
||||
|
||||
type GeneralPoolResponse = {
|
||||
result: true,
|
||||
@@ -42,9 +47,10 @@ declare let currentGeneralInfo: CardItem | undefined;
|
||||
declare const cards: Record<string, CardItem>;
|
||||
declare const validCustomOption: string[];
|
||||
|
||||
const templateGeneralCard = '<div class="general_card">\
|
||||
<h4 class="bg1 with_border"><%generalName%></h4>\
|
||||
<h4><img src="<%iconPath%>" height=64 width=64></h4><p>\
|
||||
const templateGeneralCard = '<div class="general_card">\
|
||||
<h4 class="bg1 with_border"><%generalName%></h4>\
|
||||
<h4><img src="<%iconPath%>" height=64 width=64></h4><p>\
|
||||
<%if(event100Growth){%><b>195년 최종 동조 목표</b><br><%}%>\
|
||||
<%if(leadership){%>\
|
||||
<%leadership%> / <%strength%> / <%intel%><br>\
|
||||
<%}%>\
|
||||
@@ -137,12 +143,16 @@ async function buildGeneral(e: JQuery.Event) {
|
||||
method: 'post',
|
||||
responseType: 'json',
|
||||
data: convertFormData({
|
||||
pick: unwrap(currentGeneralInfo).uniqueName,
|
||||
use_own_picture: $('#use_own_picture').is(':checked'),
|
||||
leadership: parseInt(unwrap_any<string>($('#leadership').val())),
|
||||
strength: parseInt(unwrap_any<string>($('#leadership').val())),
|
||||
intel: parseInt(unwrap_any<string>($('#leadership').val())),
|
||||
personal: unwrap_any<string>($('#selChar').val())
|
||||
pick: unwrap(currentGeneralInfo).uniqueName,
|
||||
use_own_picture: $('#use_own_picture').is(':checked'),
|
||||
leadership: parseInt(unwrap_any<string>($('#leadership').val())),
|
||||
strength: parseInt(unwrap_any<string>(
|
||||
$(unwrap(currentGeneralInfo).event100Growth ? '#strength' : '#leadership').val()
|
||||
)),
|
||||
intel: parseInt(unwrap_any<string>(
|
||||
$(unwrap(currentGeneralInfo).event100Growth ? '#intel' : '#leadership').val()
|
||||
)),
|
||||
personal: unwrap_any<string>($('#selChar').val())
|
||||
})
|
||||
})
|
||||
result = response.data;
|
||||
@@ -287,4 +297,4 @@ $(async function ($) {
|
||||
$('.custom_stat').show();
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user