Skip to content

Commit

Permalink
Fixed some typos and reworded a couple parts; About page no longer ov…
Browse files Browse the repository at this point in the history
…erwrites the count db; Added brief print statements to those try sections until I can remove them
  • Loading branch information
meldontaragon committed Jan 16, 2021
1 parent 76b2c92 commit 72cad2a
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
14 changes: 10 additions & 4 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
app.config['SQLALCHEMY_DATABASE_URI'] = os.environ['DATABASE_URL']
app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False
db = SQLAlchemy(app)
# db.create_all()

LAST_CALC_DATE = datetime.fromtimestamp(1563736200)

Expand Down Expand Up @@ -48,9 +47,12 @@ def decompose_url(url):
def increment_count(db):
count = Count.query.get(1)


# TODO: Fix this
try:
count.total_reports = count.total_reports + 1
except:
print('Count db error')
count = Count(count_id = 1, total_reports = 1)
db.session.add(count)
db.session.commit()
Expand Down Expand Up @@ -80,13 +82,15 @@ def homepage():

@app.route('/about')
def about():
# TODO: Fix this
try:
count = Count.query.get(1)
except:
db.create_all()
print('Count db error.')
# db.create_all()
# db.session.add(count)
# db.session.commit()
count = Count(count_id = 1, total_reports = 1)
db.session.add(count)
db.session.commit()

return render_template('about.html', report_count=count.total_reports)

Expand All @@ -101,9 +105,11 @@ def calc(report_id, fight_id):
if len(report_id) != 16:
return redirect(url_for('homepage'))

# TODO: Fix this
try:
report = Report.query.filter_by(report_id=report_id, fight_id=fight_id).first()
except:
print('Report db error')
db.create_all()
report = Report.query.filter_by(report_id=report_id, fight_id=fight_id).first()

Expand Down
5 changes: 3 additions & 2 deletions templates/about.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,14 @@ <h2>Does it account for...</h2>
<p>Generally, yes. Specifically it accounts for these commonly asked things:</p>
<ul>
<li>Includes pet damage</li>
<li>Excludes the 3%/4%/6%/8% damage buff from the card
<li>Excludes ticks from DoTs snapshotted before the card window</li>
<li>Excludes ticks from DoTs snapshotted after the card window</li>
<li>Includes ticks from DoTs snapshotted inside the card window, including ticks that happen afterward</li>
<li>Includes the portion of Wildfire damage generated by damage inside the tether window (Stormblood logs only)</li>
<li>Includes damage from ground effect DoTs (Shadow Flare, Doton, Salted Earth, Flamethrower)</li>
<li>Includes damage from Radiant Shield (when applicable)</li>
<li>Excludes the 3%/4%/6%/8% damage buff from the card</li>
<li>Accounts for the correct melee/ranged bonus associated with the card</li>
</ul>

<h2>How it works</h2>
Expand All @@ -43,7 +44,7 @@ <h2>Current limitations</h2>
<li>Look for whether a card overwrote another</li>
<li>Look at whether a Lord/Lady usage should have been swapped with a normal card usage elsewhere in the same Divination window</li>
<li>Look at whether you should have tried to Redraw for a card of the opposite melee/ranged type</li>
<li>There is no consideration of what seals you have currently or ned for your next Divination</li>
<li>There is no consideration of what seals you have currently or need for your next Divination</li>
<li>If multiple cards are active at the same time players that have cards are ignored for the later card plays without checking if an alternative play order would have been more optimal</li>
</ul>

Expand Down
2 changes: 1 addition & 1 deletion templates/calc.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ <h6 class="card-subtitle mb-2">{{ report.enc_time }}</h6>
<tr>
<th scope="col">Player</th>
<th scope="col">Job</th>
<th scope="col">Damage</th>
<th scope="col">Adjusted Damage</th>
<th scope="col">Raw Damage</th>
</tr>
</thead>
Expand Down

0 comments on commit 72cad2a

Please sign in to comment.